Re: [Carbon-dev] [Carbon-commits] [Carbon] svn commit r118913 - trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general
On Thu, Jan 12, 2012 at 2:19 PM, sub...@wso2.com wrote: Author: subash Date: Thu Jan 12 00:49:03 2012 New Revision: 118913 URL: http://wso2.org/svn/browse/wso2?view=revrevision=118913 Log: Added a test for the issue CARBON-12200 Modified: trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java Modified: trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java URL: http://wso2.org/svn/browse/wso2/trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java?rev=118913r1=118912r2=118913view=diff == --- trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java (original) +++ trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java Thu Jan 12 00:49:03 2012 @@ -34,6 +34,7 @@ // super.runSuccessCase(); try { getChildCountForCollection(); +doPagedGet(); } catch (RegistryException e) { e.printStackTrace(); fail(Get child count for collection test failed ); @@ -48,4 +49,12 @@ Collection collection = (Collection) resource; assertTrue(true, Child count is + collection.getChildCount()); } + +public void doPagedGet() throws RegistryException { +String path = /_system; +Resource resource = registry.get(path, 1, 1); +assertTrue((resource instanceof Collection), resource is not a collection); +Collection collection = (Collection) resource; +assertTrue(true, Child count is + collection.getChildCount()); This type of assertTrue(true) statement does not add any value to a test. I think it should be; assertEquals(n, collection.getChildCount()); +} } ___ Carbon-commits mailing list carbon-comm...@wso2.org https://wso2.org/cgi-bin/mailman/listinfo/carbon-commits -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ * http://www.apache.org/** email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919 blog: **http://blog.afkham.org* http://blog.afkham.org* twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez * linked-in: **http://lk.linkedin.com/in/afkhamazeez* * * *Lean . Enterprise . Middleware* ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
Re: [Carbon-dev] [Carbon-commits] [Carbon] svn commit r118913 - trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general
On Fri, Jan 13, 2012 at 4:42 PM, Afkham Azeez az...@wso2.com wrote: On Thu, Jan 12, 2012 at 2:19 PM, sub...@wso2.com wrote: Author: subash Date: Thu Jan 12 00:49:03 2012 New Revision: 118913 URL: http://wso2.org/svn/browse/wso2?view=revrevision=118913 Log: Added a test for the issue CARBON-12200 Modified: trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java Modified: trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java URL: http://wso2.org/svn/browse/wso2/trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java?rev=118913r1=118912r2=118913view=diff == --- trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java (original) +++ trunk/carbon/products/greg/modules/integration/registry/tests/src/test/java/org/wso2/carbon/registry/ws/client/test/general/CollectionChildCountWSTestCase.java Thu Jan 12 00:49:03 2012 @@ -34,6 +34,7 @@ // super.runSuccessCase(); try { getChildCountForCollection(); +doPagedGet(); } catch (RegistryException e) { e.printStackTrace(); fail(Get child count for collection test failed ); @@ -48,4 +49,12 @@ Collection collection = (Collection) resource; assertTrue(true, Child count is + collection.getChildCount()); } + +public void doPagedGet() throws RegistryException { +String path = /_system; +Resource resource = registry.get(path, 1, 1); +assertTrue((resource instanceof Collection), resource is not a collection); +Collection collection = (Collection) resource; +assertTrue(true, Child count is + collection.getChildCount()); This type of assertTrue(true) statement does not add any value to a test. I think it should be; assertEquals(n, collection.getChildCount()); +1 and Fixed under revision 119003. +} } ___ Carbon-commits mailing list carbon-comm...@wso2.org https://wso2.org/cgi-bin/mailman/listinfo/carbon-commits -- *Afkham Azeez* Director of Architecture; WSO2, Inc.; http://wso2.com Member; Apache Software Foundation; http://www.apache.org/ * http://www.apache.org/** email: **az...@wso2.com* az...@wso2.com* cell: +94 77 3320919 blog: **http://blog.afkham.org* http://blog.afkham.org* twitter: **http://twitter.com/afkham_azeez*http://twitter.com/afkham_azeez * linked-in: **http://lk.linkedin.com/in/afkhamazeez* * * *Lean . Enterprise . Middleware* -- Subash Chaturanga Software Engineer WSO2 Inc. http://wso2.com email - sub...@wso2.com phone - 077 2225922 ___ Carbon-dev mailing list Carbon-dev@wso2.org http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev