Skip to content

Commit dbc00b5

Browse files
committed
ContextCreationTest: add empty plugins test
1 parent cfd8150 commit dbc00b5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/test/java/org/scijava/ContextCreationTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
package org.scijava;
3333

3434
import static org.junit.Assert.assertEquals;
35+
import static org.junit.Assert.assertFalse;
3536
import static org.junit.Assert.assertNotNull;
3637
import static org.junit.Assert.assertNull;
3738
import static org.junit.Assert.assertSame;
@@ -63,6 +64,17 @@ public class ContextCreationTest {
6364
public void testEmpty() {
6465
final Context context = new Context(true);
6566
assertTrue(context.getServiceIndex().isEmpty());
67+
assertFalse(context.getPluginIndex().isEmpty());
68+
}
69+
70+
/**
71+
* Tests {@link Context#Context(boolean, boolean)} with {@code (true, true)}.
72+
*/
73+
@Test
74+
public void testNoPlugins() {
75+
final Context context = new Context(true, true);
76+
assertTrue(context.getServiceIndex().isEmpty());
77+
assertTrue(context.getPluginIndex().isEmpty());
6678
}
6779

6880
/**

0 commit comments

Comments
 (0)