From 2b4185c42e159569bea9495f0888ad8f88a8a5de Mon Sep 17 00:00:00 2001 From: Decebal Suiu Date: Tue, 21 Mar 2023 09:58:41 +0200 Subject: Improve test --- pf4j/src/test/java/org/pf4j/LoadPluginsTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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())); } -- cgit v1.2.3