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
1 changed files with 2 additions and 2 deletions

View File

@ -10,10 +10,10 @@ class CommandRegistryTest {
@Test
void should_create_registry() {
CommandRegistry registry = new CommandRegistry(true, "BotUsername");
CommandRegistry registry = new CommandRegistry(true, () -> "BotUsername");
Assertions.assertNotNull(registry, "CommandRegistry is not created");
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");
}