use of cz.metacentrum.perun.core.api.ContactGroup in project perun by CESNET.
the class FacilitiesManagerEntryIntegrationTest method getAllContactGroupNames.
@Test
public void getAllContactGroupNames() throws Exception {
System.out.println(CLASS_NAME + "getAllContactGroupNames");
String contactGroupName1 = "testContactGroup01";
String contactGroupName2 = "testContactGroup02";
String contactGroupName3 = "testContactGroup03";
ContactGroup cg1 = new ContactGroup(contactGroupName1, facility);
ContactGroup cg2 = new ContactGroup(contactGroupName2, facility);
ContactGroup cg3 = new ContactGroup(contactGroupName3, facility);
cg1.setOwners(new ArrayList<>(Arrays.asList(owner)));
cg2.setOwners(new ArrayList<>(Arrays.asList(owner)));
cg3.setOwners(new ArrayList<>(Arrays.asList(owner)));
List<ContactGroup> cgs = new ArrayList<>(Arrays.asList(cg1, cg2, cg3));
facilitiesManagerEntry.addFacilityContacts(sess, cgs);
List<String> cgnames = facilitiesManagerEntry.getAllContactGroupNames(sess);
assertTrue(cgnames.contains(contactGroupName1));
assertTrue(cgnames.contains(contactGroupName2));
assertTrue(cgnames.contains(contactGroupName3));
}
Aggregations