use of org.eclipse.winery.model.tosca.TOperation in project winery by eclipse.
the class GeneratorTest method testInOut.
@Test
public void testInOut() throws Exception {
TInterface tinterface = new TInterface();
tinterface.setName("http://www.example.org/interfaces/lifecycle");
TOperation op1 = new TOperation();
op1.setName("Op1InOut");
tinterface.getOperation().add(op1);
TOperation.InputParameters op1InputParameters = new TOperation.InputParameters();
TParameter op1ip1 = new TParameter();
op1ip1.setName("op1ip1");
op1ip1.setType("xs:string");
op1InputParameters.getInputParameter().add(op1ip1);
TParameter op1ip2 = new TParameter();
op1ip2.setName("op1ip2");
op1ip2.setType("xs:string");
op1InputParameters.getInputParameter().add(op1ip2);
op1.setInputParameters(op1InputParameters);
TOperation.OutputParameters op1OutputParameters = new TOperation.OutputParameters();
TParameter op1op1 = new TParameter();
op1op1.setName("op1op1");
op1op1.setType("xs:string");
op1OutputParameters.getOutputParameter().add(op1op1);
TParameter op1op2 = new TParameter();
op1op2.setName("op1op2");
op1op1.setType("xs:string");
op1OutputParameters.getOutputParameter().add(op1op2);
op1.setOutputParameters(op1OutputParameters);
TNodeType nodeType = new TNodeType();
nodeType.setName("test");
nodeType.setTargetNamespace("http://asd.com");
Generator gen = new Generator(tinterface, "org.opentosca.ia", new URL("http://asd.com"), "testname", WORKING_DIR.toFile());
Path generateProject = gen.generateProject();
System.out.println(generateProject);
}
Aggregations