From: Decebal Suiu Date: Tue, 21 Mar 2023 07:58:41 +0000 (+0200) Subject: Improve test X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fheads%2F%23520;p=pf4j.git Improve test --- diff --git a/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java b/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java index a03528c..ba651cb 100644 --- a/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java +++ b/pf4j/src/test/java/org/pf4j/LoadPluginsTest.java @@ -161,10 +161,13 @@ public class LoadPluginsTest { assertEquals(1, pluginManager.getPlugins().size()); assertTrue(pluginManager.unloadPlugin(pluginId)); - // duplicate check + assertEquals(0, pluginManager.getPlugins().size()); assertNull(pluginManager.idForPath(pluginZip.unzippedPath())); - // Double unload ok + + // double unload ok assertThrows(IllegalArgumentException.class, () -> pluginManager.unloadPlugin(pluginId), "Unknown pluginId " + pluginId); + + // load plugin again assertNotNull(pluginManager.loadPlugin(pluginZip.unzippedPath())); }