Remove deprecated versions

This commit is contained in:
rubenlagus 2020-10-31 13:19:19 +00:00 committed by Ruben Bermudez
parent 6b18fbb545
commit 0a58ef7120

View File

@ -10,10 +10,10 @@ class CommandRegistryTest {
@Test @Test
void should_create_registry() { void should_create_registry() {
CommandRegistry registry = new CommandRegistry(true, "BotUsername"); CommandRegistry registry = new CommandRegistry(true, () -> "BotUsername");
Assertions.assertNotNull(registry, "CommandRegistry is not created"); Assertions.assertNotNull(registry, "CommandRegistry is not created");
NullPointerException exception = Assertions.assertThrows(NullPointerException.class, NullPointerException exception = Assertions.assertThrows(NullPointerException.class,
() -> new CommandRegistry(true, (String) null)); () -> new CommandRegistry(true, () -> "BotUsername"));
Assertions.assertEquals("Bot username must not be null", exception.getMessage(), "Invalid exception message"); Assertions.assertEquals("Bot username must not be null", exception.getMessage(), "Invalid exception message");
} }