use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class FacilitiesManagerEntryIntegrationTest method getFacilitiesByDestination.
@Test
public void getFacilitiesByDestination() throws Exception {
System.out.println(CLASS_NAME + "getFacilitiesByDestination");
Service serv = new Service();
serv.setName("TestovaciSluzba");
perun.getServicesManager().createService(sess, serv);
Destination dest = new Destination();
dest.setType("service-specific");
dest.setDestination("TestovaciDestinace");
perun.getServicesManager().addDestination(sess, serv, facility, dest);
List<Facility> facilities = perun.getFacilitiesManager().getFacilitiesByDestination(sess, "TestovaciDestinace");
assertTrue("At least one facility with destinatnion " + dest.getDestination() + " should exists", facilities.size() > 0);
assertTrue("Created facility with destinantion " + dest.getDestination() + " should exist between others", facilities.contains(facility));
}
Aggregations