idlgen.setOutputFile("typeInherit.idl");
idlgen.generateIDL(model);
List<CorbaTypeImpl> types = mapType.getStructOrExceptionOrUnion();
for (int i = 0; i < types.size(); i++) {
CorbaTypeImpl type = types.get(i);
if ("Type5SequenceStruct".equals(type.getName())) {
assertTrue("Name is incorrect for Type5SequenceStruct Type", type instanceof Struct);
assertEquals("Type is incorrect for AnonSequence Type", "Type5",
type.getType().getLocalPart());
} else if ("attrib2Type".equals(type.getName())) {
assertTrue("Name is incorrect for attrib2Type Type", type instanceof Anonstring);
assertEquals("Type is incorrect for AnonString Type", "string",
type.getType().getLocalPart());
} else if ("attrib2Type_nil".equals(type.getName())) {
assertTrue("Name is incorrect for Struct Type", type instanceof Union);
assertEquals("Type is incorrect for AnonSequence Type", "attrib2",
type.getType().getLocalPart());
}
}
File f = new File("typeInherit.idl");
assertTrue("typeInherit.idl should be generated", f.exists());
} finally {