use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method getServiceById.
@Test
public void getServiceById() throws Exception {
System.out.println(CLASS_NAME + "getServiceById");
service = setUpService();
assertNotNull("unable to create service", service);
Service returnedService = perun.getServicesManager().getServiceById(sess, service.getId());
assertEquals("cannot get service by ID", returnedService, service);
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method addRequiredAttributeWhenServiceNotExists.
@Test(expected = ServiceNotExistsException.class)
public void addRequiredAttributeWhenServiceNotExists() throws Exception {
System.out.println(CLASS_NAME + "addRequiredAttributeWhenServiceNotExists");
attribute = setUpAttribute();
perun.getServicesManager().addRequiredAttribute(sess, new Service(), attribute);
// shouldn't find service
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method createService.
// SetUp moved to every method to speed up.
@Test
public void createService() throws Exception {
System.out.println(CLASS_NAME + "createService");
Service service = new Service();
service.setName("ServicesManagerTestService");
service = perun.getServicesManager().createService(sess, service);
assertNotNull("unable to create Service", service);
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method addDestinationWhenServiceNotExists.
@Test(expected = ServiceNotExistsException.class)
public void addDestinationWhenServiceNotExists() throws Exception {
System.out.println(CLASS_NAME + "addDestinationWhenServiceNotExists");
facility = setUpFacility();
destination = setUpDestination();
perun.getServicesManager().addDestination(sess, new Service(), facility, destination);
// shouldn't find service
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method removeAllRequiredAttributesWhenServiceNotExists.
@Test(expected = ServiceNotExistsException.class)
public void removeAllRequiredAttributesWhenServiceNotExists() throws Exception {
System.out.println(CLASS_NAME + "removeAllRequiredAttributesWhenServiceNotExists");
perun.getServicesManager().removeAllRequiredAttributes(sess, new Service());
// shouldn't find service
}
Aggregations