Search in sources :

Example 1 with ModelWithBooleanProperty

use of io.swagger.models.ModelWithBooleanProperty in project swagger-core by swagger-api.

the class ModelPropertyTest method testIssue1743.

@Test
public void testIssue1743() {
    final Map<String, Model> models = ModelConverters.getInstance().readAll(ModelWithBooleanProperty.class);
    final Model model = models.get("ModelWithBooleanProperty");
    assertNotNull(model);
    BooleanProperty bp = (BooleanProperty) model.getProperties().get("isGreat");
    assertTrue(bp.getEnum().size() == 1);
    assertEquals(bp.getEnum().get(0), Boolean.TRUE);
}
Also used : ModelWithBooleanProperty(io.swagger.models.ModelWithBooleanProperty) BooleanProperty(io.swagger.models.properties.BooleanProperty) Model(io.swagger.models.Model) Test(org.testng.annotations.Test)

Aggregations

Model (io.swagger.models.Model)1 ModelWithBooleanProperty (io.swagger.models.ModelWithBooleanProperty)1 BooleanProperty (io.swagger.models.properties.BooleanProperty)1 Test (org.testng.annotations.Test)1