Skip to content

Commit

Permalink
Add Test
Browse files Browse the repository at this point in the history
  • Loading branch information
frengor committed Aug 30, 2020
1 parent 152a43a commit 826285b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,14 @@ void testPluginDisableEvent() {
assertFalse(MAP_LISTENERS.containsKey(p), "Plugin hasn't been unregistered by disable event");
}

@Test
@DisplayName("Unregister not-registered plugin Test")
void testUnregisteredPluginUnregisterEvent() {
Plugin p = new DummyPlugin();
assertDoesNotThrow(() -> PacketEventManager.unregisterPacketListener(p),
"PacketEventManager#unregisterPacketListener(Plugin) throws exceptions when not-registered plugin got unregistered");
}

@Test
@DisplayName("Unregister All Test")
void testUnrgisterAll() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ public Server getServer() {

@Override
public boolean isEnabled() {
return false;
return true;
}

@Override
Expand Down

0 comments on commit 826285b

Please sign in to comment.