Package org.jclouds.docker.domain

Examples of org.jclouds.docker.domain.State$Builder


   public void setup() {
      function = new StateToStatus();
   }

   public void testStateRunningToStatusRunning() {
      State mockState = mockStateRunning();

      NodeMetadata.Status status = function.apply(mockState);

      verify(mockState);

      assertEquals(mockState.isRunning(), true);
      assertEquals(status, NodeMetadata.Status.RUNNING);
   }
View Full Code Here


      assertEquals(mockState.isRunning(), true);
      assertEquals(status, NodeMetadata.Status.RUNNING);
   }

   public void testStateNotRunningToStatusTerminated() {
      State mockState = mockStateNotRunning();

      NodeMetadata.Status status = function.apply(mockState);

      verify(mockState);

      assertEquals(mockState.isRunning(), false);
      assertEquals(status, NodeMetadata.Status.TERMINATED);
   }
View Full Code Here

      assertEquals(mockState.isRunning(), false);
      assertEquals(status, NodeMetadata.Status.TERMINATED);
   }

   private State mockStateRunning() {
      State mockState = EasyMock.createMock(State.class);

      expect(mockState.isRunning()).andReturn(true).anyTimes();
      replay(mockState);

      return mockState;
   }
View Full Code Here

      return mockState;
   }

   private State mockStateNotRunning() {
      State mockState = EasyMock.createMock(State.class);

      expect(mockState.isRunning()).andReturn(false).anyTimes();
      replay(mockState);

      return mockState;
   }
View Full Code Here

              .volumesFrom("")
              .workingDir("")
              .entrypoint(null)
              .networkDisabled(false)
              .build();
      State state = State.builder()
              .pid(3626)
              .running(true)
              .exitCode(0)
              .startedAt("2014-03-24T20:28:37.537659054Z")
              .finishedAt("0001-01-01T00:00:00Z")
View Full Code Here

TOP

Related Classes of org.jclouds.docker.domain.State$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.