Restore unit test that consider minLength, maxLength and pattern (#401)

when they are defined in a in referenced schema

Originally introduced with 6b8079808b (#45), 
commented with 85090f5068 (#82).
This commit is contained in:
Jérémie Bresson
2018-06-26 09:11:27 +02:00
committed by GitHub
parent 66b73e906e
commit ea81b0c833

View File

@@ -943,11 +943,11 @@ public class JavaModelTest {
Assert.assertTrue(cp.isNotContainer);
Assert.assertFalse(cp.isLong);
Assert.assertFalse(cp.isInteger);
// Assert.assertTrue(cp.isString); //TODO: issue swagger-api/swagger-codegen#8001
Assert.assertTrue(cp.isString);
Assert.assertEquals(cp.getter, "getSomePropertyWithMinMaxAndPattern");
// Assert.assertEquals(cp.minLength, Integer.valueOf(3)); //TODO: issue swagger-api/swagger-codegen#8001
// Assert.assertEquals(cp.maxLength, Integer.valueOf(10)); //TODO: issue swagger-api/swagger-codegen#8001
// Assert.assertEquals(cp.pattern, "^[A-Z]+$"); //TODO: issue swagger-api/swagger-codegen#8001
Assert.assertEquals(cp.minLength, Integer.valueOf(3));
Assert.assertEquals(cp.maxLength, Integer.valueOf(10));
Assert.assertEquals(cp.pattern, "^[A-Z]+$");
}
@Test(description = "convert an array schema")