@@ -142,6 +142,8 @@ 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, " + //
146+ "choices={'quick brown fox', 'lazy dog'}) animal\n " + //
145147 "% @BOTH java.lang.StringBuilder buffer" ;
146148
147149 final ScriptInfo info =
@@ -157,6 +159,12 @@ public void testParameters() {
157159 assertItem ("sliderValue" , int .class , "Slider Value" , ItemIO .INPUT , true ,
158160 true , null , "slider" , 11 , null , null , 5 , 15 , 3.0 , noChoices , sliderValue );
159161
162+ final ModuleItem <?> animal = info .getInput ("animal" );
163+ final List <String > animalChoices = //
164+ Arrays .asList ("quick brown fox" , "lazy dog" );
165+ assertItem ("animal" , String .class , null , ItemIO .INPUT , true , false ,
166+ null , null , null , null , null , null , null , null , animalChoices , animal );
167+
160168 final ModuleItem <?> buffer = info .getOutput ("buffer" );
161169 assertItem ("buffer" , StringBuilder .class , null , ItemIO .BOTH , true , true ,
162170 null , null , null , null , null , null , null , null , noChoices , buffer );
@@ -166,7 +174,7 @@ public void testParameters() {
166174 null , null , null , null , null , null , null , noChoices , result );
167175
168176 int inputCount = 0 ;
169- final ModuleItem <?>[] inputs = { log , sliderValue , buffer };
177+ final ModuleItem <?>[] inputs = { log , sliderValue , animal , buffer };
170178 for (final ModuleItem <?> inItem : info .inputs ()) {
171179 assertSame (inputs [inputCount ++], inItem );
172180 }
0 commit comments