aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2024-11-29 21:38:03 +0200
committerDecebal Suiu <decebal.suiu@gmail.com>2024-11-29 21:38:03 +0200
commitb0cee20307e75b1b00c3ef2c14135774606a7c05 (patch)
tree26b2a79678e916486a36759fd3cd3a6051621021
parentab15ab899e47ce050529e252e331418ce41f1862 (diff)
downloadpf4j-b0cee20307e75b1b00c3ef2c14135774606a7c05.tar.gz
pf4j-b0cee20307e75b1b00c3ef2c14135774606a7c05.zip
Add more tests
-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));
+ }
+
}