use of se.inera.intyg.infra.security.common.model.TitleCode in project webcert by sklintyg.
the class SecurityConfigurationLoaderTest method loadConfigurationAndAssertTypeOfObjects.
@Test
public void loadConfigurationAndAssertTypeOfObjects() {
AuthoritiesConfiguration configuration = loader.getAuthoritiesConfiguration();
assertEquals(4, configuration.getRequestOrigins().size());
assertEquals(9, configuration.getPrivileges().size());
assertEquals(4, configuration.getRoles().size());
assertEquals(2, configuration.getTitles().size());
assertEquals(4, configuration.getTitleCodes().size());
// Assert that lists are of specific types
try {
List<RequestOrigin> requestOrigins = (List<RequestOrigin>) configuration.getRequestOrigins();
List<Privilege> privileges = (List<Privilege>) configuration.getPrivileges();
List<Role> roles = (List<Role>) configuration.getRoles();
List<Title> titles = (List<Title>) configuration.getTitles();
List<TitleCode> titleCodes = (List<TitleCode>) configuration.getTitleCodes();
} catch (Exception e) {
fail(e.getMessage());
}
}
Aggregations