Skip to content

Commit 004bf6c

Browse files
committed
ScriptInfoTest: test custom attribute population
1 parent be41b8e commit 004bf6c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/test/java/org/scijava/script/ScriptInfoTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ public void testParameters() {
142142
"% @LogService(required = false) log\n" + //
143143
"% @int(label=\"Slider Value\", softMin=5, softMax=15, " + //
144144
"stepSize=3, value=11, style=\"slider\") sliderValue\n" + //
145-
"% @String(persist = false, " + //
145+
"% @String(persist = false, family='Carnivora', " + //
146146
"choices={'quick brown fox', 'lazy dog'}) animal\n" + //
147147
"% @BOTH java.lang.StringBuilder buffer";
148148

@@ -164,6 +164,7 @@ public void testParameters() {
164164
Arrays.asList("quick brown fox", "lazy dog");
165165
assertItem("animal", String.class, null, ItemIO.INPUT, true, false,
166166
null, null, null, null, null, null, null, null, animalChoices, animal);
167+
assertEquals(animal.get("family"), "Carnivora"); // test custom attribute
167168

168169
final ModuleItem<?> buffer = info.getOutput("buffer");
169170
assertItem("buffer", StringBuilder.class, null, ItemIO.BOTH, true, true,

0 commit comments

Comments
 (0)