Adding an index file and avoiding the use of the model.d.ts files because typescript doesn't compile it correctly.

This commit is contained in:
Kristof Vrolijkx
2016-04-20 11:10:29 +02:00
parent 2af29fa831
commit 1825a467d8
7 changed files with 29 additions and 18 deletions

View File

@@ -119,10 +119,10 @@ public class TypeScriptAngular2ModelTest {
final CodegenProperty property1 = cm.vars.get(0);
Assert.assertEquals(property1.baseName, "children");
Assert.assertEquals(property1.datatype, "model.Children");
Assert.assertEquals(property1.datatype, "models.Children");
Assert.assertEquals(property1.name, "children");
Assert.assertEquals(property1.defaultValue, "null");
Assert.assertEquals(property1.baseType, "model.Children");
Assert.assertEquals(property1.baseType, "models.Children");
Assert.assertNull(property1.required);
Assert.assertTrue(property1.isNotContainer);
}
@@ -143,8 +143,8 @@ public class TypeScriptAngular2ModelTest {
final CodegenProperty property1 = cm.vars.get(0);
Assert.assertEquals(property1.baseName, "children");
Assert.assertEquals(property1.complexType, "model.Children");
Assert.assertEquals(property1.datatype, "Array<model.Children>");
Assert.assertEquals(property1.complexType, "models.Children");
Assert.assertEquals(property1.datatype, "Array<models.Children>");
Assert.assertEquals(property1.name, "children");
Assert.assertEquals(property1.baseType, "Array");
Assert.assertNull(property1.required);
@@ -178,6 +178,6 @@ public class TypeScriptAngular2ModelTest {
Assert.assertEquals(cm.description, "a map model");
Assert.assertEquals(cm.vars.size(), 0);
Assert.assertEquals(cm.imports.size(), 1);
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("model.Children")).size(), 1);
Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("models.Children")).size(), 1);
}
}