Search in sources :

Example 6 with DomainRoleMembersFetcher

use of com.yahoo.athenz.common.server.notification.DomainRoleMembersFetcher in project athenz by yahoo.

the class DomainRoleMembersFetcherTest method testNoDomain.

@Test
public void testNoDomain() {
    DataStore dataStore = mock(DataStore.class);
    DomainRoleMembersFetcher domainRoleMembersFetcher = new DomainRoleMembersFetcher(dataStore, USER_DOMAIN_PREFIX);
    Set<String> domainRoleMembers = domainRoleMembersFetcher.getDomainRoleMembers("domain1", "domain1:role.admin");
    assertEquals(new HashSet<>(), domainRoleMembers);
}
Also used : DataStore(com.yahoo.athenz.zts.store.DataStore) DomainRoleMembersFetcher(com.yahoo.athenz.common.server.notification.DomainRoleMembersFetcher) Test(org.testng.annotations.Test)

Aggregations

DomainRoleMembersFetcher (com.yahoo.athenz.common.server.notification.DomainRoleMembersFetcher)6 Test (org.testng.annotations.Test)6 DBService (com.yahoo.athenz.zms.DBService)2 DataStore (com.yahoo.athenz.zts.store.DataStore)2 Role (com.yahoo.athenz.zms.Role)1 RoleMember (com.yahoo.athenz.zms.RoleMember)1 AthenzDomain (com.yahoo.athenz.zms.store.AthenzDomain)1