use of com.hazelcast.internal.management.dto.ClientBwListDTO in project hazelcast by hazelcast.
the class ClientBwListConfigHandlerTest method testApplyConfig_emptyBlacklist.
@Test
public void testApplyConfig_emptyBlacklist() {
clientEngine.applySelector(ClientSelectors.none());
ClientBwListDTO config = createConfig(Mode.BLACKLIST);
handler.applyConfig(config);
Client client = createClient("127.0.0.1", "a_name");
assertTrue(clientEngine.isClientAllowed(client));
}
use of com.hazelcast.internal.management.dto.ClientBwListDTO in project hazelcast by hazelcast.
the class ClientBwListConfigHandlerTest method testApplyConfig_nullEntryType_throws.
@Test
public void testApplyConfig_nullEntryType_throws() {
ClientBwListDTO config = createConfig(Mode.WHITELIST, new ClientBwListEntryDTO(null, "127.0.0.*"));
assertThrows(NullPointerException.class, () -> handler.applyConfig(config));
}
use of com.hazelcast.internal.management.dto.ClientBwListDTO in project hazelcast by hazelcast.
the class ClientBwListConfigHandlerTest method testApplyConfig_nullEntryValue_throws.
@Test
public void testApplyConfig_nullEntryValue_throws() {
ClientBwListDTO config = createConfig(Mode.WHITELIST, new ClientBwListEntryDTO(Type.IP_ADDRESS, null));
assertThrows(NullPointerException.class, () -> handler.applyConfig(config));
}
Aggregations