Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
Signed-off-by: tvallin <thibault.vallin@oracle.com>
  • Loading branch information
tvallin committed Oct 11, 2023
1 parent 9681b21 commit c1acd77
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,24 +193,6 @@ protected void onVisitStep(Step step, Context context) {
assertThat(steps, contains("step", "my-step"));
}

@Test
void testConditionalBlockInput() {
Script script = load("controller/conditional-block.xml");
Context context = Context.create();
context.putValue("foo", Value.create(true), ContextValue.ValueKind.EXTERNAL);
context.putValue("bar", Value.create(false), ContextValue.ValueKind.EXTERNAL);
List<String> options = new LinkedList<>();
Controller.walk(new TerminalInputResolver(new ByteArrayInputStream(new byte[0])) {
@Override
public VisitResult visitOption(Input.Option option, Context context) {
options.add(option.name());
return super.visitOption(option, context);
}
}, script, context);

assertThat(options, contains("Option"));
}

private static List<String> modelValues(Block block, Context context) {
List<String> values = new LinkedList<>();
Controller.walk(new Model.Visitor<>() {
Expand Down

0 comments on commit c1acd77

Please sign in to comment.