@Test public void testdeleteCIS() throws InterruptedException, ExecutionException { System.out.println("test delete CIS"); cisManagerUnderTest = new CisManager(); this.setMockingOnCISManager(cisManagerUnderTest); cisManagerUnderTestInterface = cisManagerUnderTest; assertFalse(cisManagerUnderTestInterface.deleteCis("nonexistingjid.xmpp")); ICisOwned[] ciss = new ICisOwned [2]; String jidTobeDeleted = ""; ciss[0] = (cisManagerUnderTestInterface.createCis( TEST_CIS_NAME_1, TEST_CIS_TYPW ,null,"")).get(); ciss[1] = (cisManagerUnderTestInterface.createCis( TEST_CIS_NAME_2, TEST_CIS_TYPW ,null,"")).get(); List<ICis> l = cisManagerUnderTestInterface.getCisList(); Iterator<ICis> it = l.iterator(); ICis element = it.next(); jidTobeDeleted = element.getCisId(); assertFalse(cisManagerUnderTestInterface.deleteCis("nonexistingjid.xmpp")); boolean presence = false; presence = cisManagerUnderTestInterface.deleteCis(jidTobeDeleted); assertEquals(true,presence); presence = false; l = cisManagerUnderTestInterface.getCisList(); it = l.iterator(); int interactions = 0; while(it.hasNext()){ element = it.next(); interactions++; if(element.getCisId().equals(jidTobeDeleted)) presence = true; } assertEquals(false,presence); assertEquals(1,interactions); l = cisManagerUnderTestInterface.getCisList(); it = l.iterator(); while(it.hasNext()){ element = it.next(); cisManagerUnderTestInterface.deleteCis( element.getCisId()); } System.out.println("end of delete CIS"); assertEquals(cisManagerUnderTest.getCisList().size(),0); }
@Override public boolean deleteCis(String cisId) { return this.deleteOwnedCis(cisId); }
CisManager implements ICisManager, IFeatureServer { @Override public boolean deleteCis(String cisId) { return this.deleteOwnedCis(cisId); } }
CisManager implements ICisManager, IFeatureServer { @Override public boolean deleteCis(String cisId) { return this.deleteOwnedCis(cisId); } CisManager(); }
CisManager implements ICisManager, IFeatureServer { @Override public boolean deleteCis(String cisId) { return this.deleteOwnedCis(cisId); } CisManager(); ICssDirectoryRemote getCssDirectoryRemote(); void setCssDirectoryRemote(ICssDirectoryRemote cssDirectoryRemote); IActivityFeedManager getiActivityFeedManager(); void setiActivityFeedManager(IActivityFeedManager iActivityFeedManager); IUserFeedback getiUsrFeedback(); void setiUsrFeedback(IUserFeedback iUsrFeedback); INegotiation getNegotiator(); IPrivacyDataManager getPrivacyDataManager(); void setNegotiator(INegotiation negotiator); IPrivacyPolicyManager getPrivacyPolicyManager(); ICtxBroker getInternalCtxBroker(); void setInternalCtxBroker(ICtxBroker internalCtxBroker); IEventMgr getEventMgr(); void setEventMgr(IEventMgr eventMgr); ICISCommunicationMgrFactory getCcmFactory(); void setCcmFactory(ICISCommunicationMgrFactory ccmFactory); ICommManager getICommMgr(); void setICommMgr(ICommManager cSSendpoint); ICisDirectoryRemote getiCisDirRemote(); void setiCisDirRemote(ICisDirectoryRemote iCisDirRemote); void startup(); void init(); @Override Future<ICisOwned> createCis(String cisName, String cisType,
			Hashtable<String, MembershipCriteria> cisCriteria,
			String description); @Override Future<ICisOwned> createCis(String cisName, String cisType,
			Hashtable<String, MembershipCriteria> cisCriteria,
			String description, String privacyPolicy); boolean subscribeToCis(CisRecord record); boolean unsubscribeToCis(String cisjid); @Override List<String> getJavaPackages(); @Override Object getQuery(Stanza stanza, Object payload); ICommManager getiCommMgr(); void setiCommMgr(ICommManager iCommMgr); @Override List<String> getXMLNamespaces(); @Override void receiveMessage(Stanza stanza, Object payload); @Override Object setQuery(Stanza arg0, Object arg1); @Override boolean deleteCis(String cisId); @Override List<ICis> getCisList(); @Override List<ICis> searchCisByName(String name); @Override List<ICisOwned> getListOfOwnedCis(); @Override List<ICis> getRemoteCis(); @Override List<ICisOwned> searchCisByMember(IIdentity css); @Override ICis getCis(String cisId); @Override ICisOwned getOwnedCis(String cisId); SessionFactory getSessionFactory(); void setSessionFactory(SessionFactory sessionFactory); List<Cis> getOwnedCISs(); List<CisSubscribedImp> getSubscribedCISs(); @Override void getListOfMembers(Requestor req, IIdentity targetcis,
			ICisManagerCallback callback); ICisRemote getHandlerToRemoteCis(String cisId); @Override void joinRemoteCIS(CisAdvertisementRecord adv, ICisManagerCallback callback); @Override void leaveRemoteCIS(String cisId, ICisManagerCallback callback); void UnRegisterCisManager(); void setPrivacyPolicyManager(IPrivacyPolicyManager privacyPolicyManager); void setPrivacyDataManager(IPrivacyDataManager privacyDataManager); boolean isPrivacyPolicyNegotiationIncluded(); void setPrivacyPolicyNegotiationIncluded(
			boolean privacyPolicyNegotiationIncluded); }
CisManager implements ICisManager, IFeatureServer { @Override public boolean deleteCis(String cisId) { return this.deleteOwnedCis(cisId); } CisManager(); ICssDirectoryRemote getCssDirectoryRemote(); void setCssDirectoryRemote(ICssDirectoryRemote cssDirectoryRemote); IActivityFeedManager getiActivityFeedManager(); void setiActivityFeedManager(IActivityFeedManager iActivityFeedManager); IUserFeedback getiUsrFeedback(); void setiUsrFeedback(IUserFeedback iUsrFeedback); INegotiation getNegotiator(); IPrivacyDataManager getPrivacyDataManager(); void setNegotiator(INegotiation negotiator); IPrivacyPolicyManager getPrivacyPolicyManager(); ICtxBroker getInternalCtxBroker(); void setInternalCtxBroker(ICtxBroker internalCtxBroker); IEventMgr getEventMgr(); void setEventMgr(IEventMgr eventMgr); ICISCommunicationMgrFactory getCcmFactory(); void setCcmFactory(ICISCommunicationMgrFactory ccmFactory); ICommManager getICommMgr(); void setICommMgr(ICommManager cSSendpoint); ICisDirectoryRemote getiCisDirRemote(); void setiCisDirRemote(ICisDirectoryRemote iCisDirRemote); void startup(); void init(); @Override Future<ICisOwned> createCis(String cisName, String cisType,
			Hashtable<String, MembershipCriteria> cisCriteria,
			String description); @Override Future<ICisOwned> createCis(String cisName, String cisType,
			Hashtable<String, MembershipCriteria> cisCriteria,
			String description, String privacyPolicy); boolean subscribeToCis(CisRecord record); boolean unsubscribeToCis(String cisjid); @Override List<String> getJavaPackages(); @Override Object getQuery(Stanza stanza, Object payload); ICommManager getiCommMgr(); void setiCommMgr(ICommManager iCommMgr); @Override List<String> getXMLNamespaces(); @Override void receiveMessage(Stanza stanza, Object payload); @Override Object setQuery(Stanza arg0, Object arg1); @Override boolean deleteCis(String cisId); @Override List<ICis> getCisList(); @Override List<ICis> searchCisByName(String name); @Override List<ICisOwned> getListOfOwnedCis(); @Override List<ICis> getRemoteCis(); @Override List<ICisOwned> searchCisByMember(IIdentity css); @Override ICis getCis(String cisId); @Override ICisOwned getOwnedCis(String cisId); SessionFactory getSessionFactory(); void setSessionFactory(SessionFactory sessionFactory); List<Cis> getOwnedCISs(); List<CisSubscribedImp> getSubscribedCISs(); @Override void getListOfMembers(Requestor req, IIdentity targetcis,
			ICisManagerCallback callback); ICisRemote getHandlerToRemoteCis(String cisId); @Override void joinRemoteCIS(CisAdvertisementRecord adv, ICisManagerCallback callback); @Override void leaveRemoteCIS(String cisId, ICisManagerCallback callback); void UnRegisterCisManager(); void setPrivacyPolicyManager(IPrivacyPolicyManager privacyPolicyManager); void setPrivacyDataManager(IPrivacyDataManager privacyDataManager); boolean isPrivacyPolicyNegotiationIncluded(); void setPrivacyPolicyNegotiationIncluded(
			boolean privacyPolicyNegotiationIncluded);  }