FlowPartClass aClass = results.get(0);
assertThat(aClass.getInputPorts().size(), is(2));
assertThat(aClass.getOutputPorts().size(), is(2));
assertThat(aClass.getParameters().size(), is(2));
OperatorPortDeclaration in1 = find("in1", aClass.getInputPorts());
OperatorPortDeclaration in2 = find("in2", aClass.getInputPorts());
OperatorPortDeclaration out1 = find("out1", aClass.getOutputPorts());
OperatorPortDeclaration out2 = find("out2", aClass.getOutputPorts());
OperatorPortDeclaration param1 = find("param1", aClass.getParameters());
OperatorPortDeclaration param2 = find("param2", aClass.getParameters());
assertTypeEquals(env, in1.getType().getRepresentation(), MockHoge.class);
assertThat(in1.getParameterPosition(), is(0));
assertTypeEquals(env, out1.getType().getRepresentation(), MockHoge.class);
assertThat(out1.getParameterPosition(), is(1));
assertThat(param1.getType().getRepresentation().getKind(), is(TypeKind.INT));
assertThat(param1.getParameterPosition(), is(2));
assertTypeEquals(env, in2.getType().getRepresentation(), MockFoo.class);
assertThat(in2.getParameterPosition(), is(3));
assertTypeEquals(env, out2.getType().getRepresentation(), MockFoo.class);
assertThat(out2.getParameterPosition(), is(4));
assertTypeEquals(env, param2.getType().getRepresentation(), String.class);
assertThat(param2.getParameterPosition(), is(5));
}
});
}