Canh Ngo pushed to branch feature/cmng-psp1-HSTTWO-3647 at cms-community / hippo-site-toolkit
Commits: b38545ca by Canh Ngo at 2016-04-28T12:51:53+02:00 HSTTWO-3647: cleaned up import - - - - - 1 changed file: - client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/ContainerComponentResourceTest.java Changes: ===================================== client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/ContainerComponentResourceTest.java ===================================== --- a/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/ContainerComponentResourceTest.java +++ b/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/ContainerComponentResourceTest.java @@ -35,7 +35,6 @@ import org.hippoecm.hst.pagecomposer.jaxrs.services.exceptions.ClientException; import org.junit.Before; import org.junit.Test; import org.onehippo.jaxrs.cxf.CXFTest; -import org.onehippo.jaxrs.cxf.hst.HstCXFTestFixtureHelper; import org.onehippo.repository.mock.MockNodeFactory; import static com.jayway.restassured.http.ContentType.JSON; @@ -292,14 +291,6 @@ public class ContainerComponentResourceTest extends CXFTest { verify(containerComponentService); } - private ContainerRepresentation createMockContainerRepresentation() { - final ContainerRepresentation containerToBeUpdated = createNiceMock(ContainerRepresentation.class); - expect(containerToBeUpdated.getId()).andReturn("cafebabe").anyTimes(); - expect(containerToBeUpdated.getName()).andReturn("foo-item").anyTimes(); - expect(containerToBeUpdated.getLastModifiedTimestamp()).andReturn(1234L).anyTimes(); - return containerToBeUpdated; - } - @Test public void cannot_update_a_container_item_when_its_container_is_locked() throws RepositoryException, IOException, JAXBException { final Map<String, Object> params = new HashMap<>(); @@ -334,7 +325,6 @@ public class ContainerComponentResourceTest extends CXFTest { final ContainerRepresentation containerToBeUpdated = createMockContainerRepresentation(); replay(containerComponentService, containerToBeUpdated); - given() .contentType(JSON) .body(containerToBeUpdated) @@ -367,4 +357,12 @@ public class ContainerComponentResourceTest extends CXFTest { verify(containerComponentService); } + + private ContainerRepresentation createMockContainerRepresentation() { + final ContainerRepresentation containerToBeUpdated = createNiceMock(ContainerRepresentation.class); + expect(containerToBeUpdated.getId()).andReturn("cafebabe").anyTimes(); + expect(containerToBeUpdated.getName()).andReturn("foo-item").anyTimes(); + expect(containerToBeUpdated.getLastModifiedTimestamp()).andReturn(1234L).anyTimes(); + return containerToBeUpdated; + } } \ No newline at end of file View it on GitLab: https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/b38545ca1e9317f04becd61edcdd1929f43a651a
_______________________________________________ Hippocms-svn mailing list Hippocms-svn@lists.onehippo.org https://lists.onehippo.org/mailman/listinfo/hippocms-svn