added example property

This commit is contained in:
Tony Tam
2016-02-10 15:28:00 -08:00
parent cb196eb351
commit ab5ca625c1
5 changed files with 12 additions and 5 deletions

View File

@@ -32,7 +32,8 @@ public class JavaModelTest {
final Model model = new ModelImpl()
.description("a sample model")
.property("id", new LongProperty())
.property("name", new StringProperty())
.property("name", new StringProperty()
.example("Tony"))
.property("createdAt", new DateTimeProperty())
.required("id")
.required("name");
@@ -66,6 +67,7 @@ public class JavaModelTest {
Assert.assertEquals(property2.name, "name");
Assert.assertEquals(property2.defaultValue, "null");
Assert.assertEquals(property2.baseType, "String");
Assert.assertEquals(property2.example, "Tony");
Assert.assertTrue(property2.hasMore);
Assert.assertTrue(property2.required);
Assert.assertTrue(property2.isNotContainer);