Search in sources :

Example 1 with UserService

use of com.rebuild.core.privileges.UserService in project rebuild by getrebuild.

the class GeneralEntityServiceTest method getServiceSpec.

@Test
public void getServiceSpec() {
    ServiceSpec ss = Application.getService(EntityHelper.User);
    Assertions.assertTrue(ss instanceof UserService);
    EntityService es = Application.getEntityService(MetadataHelper.getEntity(TestAllFields).getEntityCode());
    Assertions.assertTrue(es instanceof GeneralEntityService);
    boolean exThrows = false;
    try {
        Application.getEntityService(EntityHelper.User);
    } catch (RebuildException ok) {
        exThrows = true;
    }
    Assertions.assertTrue(exThrows);
}
Also used : UserService(com.rebuild.core.privileges.UserService) ServiceSpec(com.rebuild.core.service.ServiceSpec) RebuildException(com.rebuild.core.RebuildException) Test(org.junit.jupiter.api.Test)

Aggregations

RebuildException (com.rebuild.core.RebuildException)1 UserService (com.rebuild.core.privileges.UserService)1 ServiceSpec (com.rebuild.core.service.ServiceSpec)1 Test (org.junit.jupiter.api.Test)1