use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method createServiceWhenServiceExists.
@Test(expected = ServiceExistsException.class)
public void createServiceWhenServiceExists() throws Exception {
System.out.println(CLASS_NAME + "createService");
Service service = new Service();
service.setName("ServicesManagerTestService");
service = perun.getServicesManager().createService(sess, service);
service = perun.getServicesManager().createService(sess, service);
// shouldn't create same service twice
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method deleteServiceWhenServiceNotExists.
@Test(expected = ServiceNotExistsException.class)
public void deleteServiceWhenServiceNotExists() throws Exception {
System.out.println(CLASS_NAME + "deleteServiceWhenServiceNotExists");
perun.getServicesManager().deleteService(sess, new Service());
// shouldn't find service
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method updateService.
@Test
public void updateService() throws Exception {
System.out.println(CLASS_NAME + "updateService");
service = setUpService();
assertNotNull("unable to create service before update", service);
service.setName("ServicesManagerTestUpdServ");
perun.getServicesManager().updateService(sess, service);
Service returnedService = perun.getServicesManager().getServiceById(sess, service.getId());
assertEquals("service not updated", returnedService, service);
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ServicesManagerEntryIntegrationTest method removeRequiredAttributeWhenServiceNotExists.
@Test(expected = ServiceNotExistsException.class)
public void removeRequiredAttributeWhenServiceNotExists() throws Exception {
System.out.println(CLASS_NAME + "removeRequiredAttributeWhenServiceNotExists");
attribute = setUpAttribute();
perun.getServicesManager().removeRequiredAttribute(sess, new Service(), attribute);
// shouldn't find service
}
use of cz.metacentrum.perun.core.api.Service in project perun by CESNET.
the class ModulesUtilsEntryIntegrationTest method setUpService.
private Service setUpService() throws Exception {
Service service = new Service();
service.setName("AttributesManagerTestService");
perun.getServicesManager().createService(sess, service);
return service;
}
Aggregations