aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java b/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java
index 72a5dba..7a3a82f 100644
--- a/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java
+++ b/pf4j/src/test/java/org/pf4j/CompoundPluginRepositoryTest.java
@@ -86,4 +86,17 @@ class CompoundPluginRepositoryTest {
assertFalse(compoundRepository.deletePluginPath(path));
}
+ @Test
+ void deletePluginPathFromMultipleRepositories() {
+ CompoundPluginRepository compoundRepository = new CompoundPluginRepository();
+ PluginRepository mockRepository1 = mock(PluginRepository.class);
+ PluginRepository mockRepository2 = mock(PluginRepository.class);
+ Path path = mock(Path.class);
+ when(mockRepository1.deletePluginPath(path)).thenReturn(false);
+ when(mockRepository2.deletePluginPath(path)).thenReturn(true);
+ compoundRepository.add(mockRepository1);
+ compoundRepository.add(mockRepository2);
+ assertTrue(compoundRepository.deletePluginPath(path));
+ }
+
}