From: Steve L. <st...@us...> - 2005-09-29 23:12:38
|
Update of /cvsroot/smartfrog/core/components/deployapi/test/org/smartfrog/services/deployapi/test/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15124/components/deployapi/test/org/smartfrog/services/deployapi/test/system Modified Files: PortalTest.java Log Message: descriptor helper is passing its new tests! Index: PortalTest.java =================================================================== RCS file: /cvsroot/smartfrog/core/components/deployapi/test/org/smartfrog/services/deployapi/test/system/PortalTest.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PortalTest.java 29 Sep 2005 12:33:24 -0000 1.11 --- PortalTest.java 29 Sep 2005 23:12:30 -0000 1.12 *************** *** 37,40 **** --- 37,43 ---- import nu.xom.Node; + import java.util.List; + import java.util.ArrayList; + /** * created 21-Sep-2005 14:24:11 *************** *** 78,82 **** system = createSystem("localhost"); logSystemCreated(system); ! String id=system.getResourceID(); String idProperty= system.getResourceId(); assertEquals(id,idProperty); --- 81,85 ---- system = createSystem("localhost"); logSystemCreated(system); ! String id=system.getCachedResourceId(); String idProperty= system.getResourceId(); assertEquals(id,idProperty); *************** *** 87,91 **** private void logSystemCreated(SystemEndpointer system) { ! log.info("Created system "+system.getResourceID()+" @ "+system.getEndpointer().getAddress()); } --- 90,94 ---- private void logSystemCreated(SystemEndpointer system) { ! log.info("Created system "+system.getCachedResourceId()+" @ "+system.getEndpointer().getAddress()); } *************** *** 95,99 **** system = createSystem(); logSystemCreated(system); ! String id = system.getResourceID(); String idProperty = system.getResourceId(); assertEquals(id, idProperty); --- 98,102 ---- system = createSystem(); logSystemCreated(system); ! String id = system.getCachedResourceId(); String idProperty = system.getResourceId(); assertEquals(id, idProperty); *************** *** 187,196 **** Element graph = getOperation().getPortalPropertyXom(Constants.PROPERTY_PORTAL_ACTIVE_SYSTEMS); Nodes systems=graph.query("api:ActiveSystems/api:system",Constants.XOM_CONTEXT); ! for(int i=0;i<systems.size();i++) { Element job=(Element) systems.get(i); EndpointReference epr= EprHelper.XomWsa2003ToEpr(job); log.info(EprHelper.stringify(epr)); } } } --- 190,209 ---- Element graph = getOperation().getPortalPropertyXom(Constants.PROPERTY_PORTAL_ACTIVE_SYSTEMS); Nodes systems=graph.query("api:ActiveSystems/api:system",Constants.XOM_CONTEXT); ! int systemCount = systems.size(); ! List<EndpointReference> systemsList2=new ArrayList<EndpointReference>(systemCount); ! for(int i=0;i< systemCount;i++) { Element job=(Element) systems.get(i); EndpointReference epr= EprHelper.XomWsa2003ToEpr(job); + systemsList2.add(epr); log.info(EprHelper.stringify(epr)); } + List<EndpointReference> systemsList = getOperation().listSystems(); + assertEquals(systemCount,systemsList.size()); + int count=0; + for (EndpointReference epr : systemsList) { + assertTrue(EprHelper.compareEndpoints(epr, systemsList2.get(count++))); + } } + } |