Canh Ngo pushed to branch feature/HSTTWO-3695 at cms-community / 
hippo-site-toolkit


Commits:
93855c2a by Canh Ngo at 2016-06-08T16:26:01+02:00
HSTTWO-3695 fixed unitests after argument order changed

- - - - -


4 changed files:

- 
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/SiteMenuResourceTest.java
- 
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuCRUDTest.java
- 
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuDiscardTest.java
- 
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuPublicationTest.java


Changes:

=====================================
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/SiteMenuResourceTest.java
=====================================
--- 
a/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/SiteMenuResourceTest.java
+++ 
b/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/SiteMenuResourceTest.java
@@ -318,7 +318,7 @@ public class SiteMenuResourceTest {
         expect(session.hasPendingChanges()).andReturn(false);
         replay(mocks);
 
-        final Response response = siteMenuResource.move(parentTargetId, 
childTargetIndex, sourceId);
+        final Response response = siteMenuResource.move(sourceId, 
parentTargetId, childTargetIndex);
         assertThat(response.getStatus(), is(OK));
         assertThat(response.getEntity(), is(ExtResponseRepresentation.class));
 


=====================================
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuCRUDTest.java
=====================================
--- 
a/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuCRUDTest.java
+++ 
b/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuCRUDTest.java
@@ -103,7 +103,7 @@ public class MenuCRUDTest extends AbstractMenuResourceTest {
         final SiteMenuItemRepresentation newsItem = 
getSiteMenuItemRepresentation(session, "main", "News");
         final SiteMenuItemRepresentation contactItem = 
getSiteMenuItemRepresentation(session, "main", "Contact");
         String oldPath = 
session.getNodeByIdentifier(newsItem.getId()).getPath();
-        final Response move = resource.move(contactItem.getId(), 0, 
newsItem.getId());
+        final Response move = resource.move(newsItem.getId(), 
contactItem.getId(), 0);
         assertEquals(Response.Status.OK.getStatusCode(), move.getStatus());
         assertFalse(session.nodeExists(oldPath));
         String newPath = 
session.getNodeByIdentifier(contactItem.getId()).getPath() + "/News";


=====================================
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuDiscardTest.java
=====================================
--- 
a/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuDiscardTest.java
+++ 
b/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuDiscardTest.java
@@ -131,7 +131,7 @@ public class MenuDiscardTest extends 
AbstractMenuResourceTest{
         final SiteMenuItemRepresentation newsItem = 
getSiteMenuItemRepresentation(session, "main", "News");
         final SiteMenuItemRepresentation contactItem = 
getSiteMenuItemRepresentation(session, "main", "Contact");
         String oldPath = 
session.getNodeByIdentifier(newsItem.getId()).getPath();
-        resource.move(contactItem.getId(), 0, newsItem.getId());
+        resource.move(newsItem.getId(), contactItem.getId(), 0);
         String newPath = 
session.getNodeByIdentifier(contactItem.getId()).getPath() + "/News";
 
         mountResource.discardChanges();


=====================================
client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuPublicationTest.java
=====================================
--- 
a/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuPublicationTest.java
+++ 
b/client-modules/page-composer/src/test/java/org/hippoecm/hst/pagecomposer/jaxrs/services/repositorytests/sitemenuresource/MenuPublicationTest.java
@@ -100,7 +100,7 @@ public class MenuPublicationTest extends 
AbstractMenuResourceTest{
         final SiteMenuItemRepresentation newsItem = 
getSiteMenuItemRepresentation(session, "main", "News");
         final SiteMenuItemRepresentation contactItem = 
getSiteMenuItemRepresentation(session, "main", "Contact");
         String oldPath = 
session.getNodeByIdentifier(newsItem.getId()).getPath();
-        resource.move(contactItem.getId(), 0, newsItem.getId());
+        resource.move(newsItem.getId(), contactItem.getId(), 0);
         String newPath = 
session.getNodeByIdentifier(contactItem.getId()).getPath() + "/News";
 
         mountResource.publish();



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/93855c2a107058f5c6f1a468c15d1dfd7d0570b6
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to