Search in sources :

Example 1 with BaseIntegerProperty

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

the class AbstractSerializableParameterTest method testGetExampleWithBaseIntegerProperty.

@Test
public void testGetExampleWithBaseIntegerProperty() {
    // given
    instance.setProperty(new BaseIntegerProperty());
    String example = "14";
    // when
    instance.setExample(example);
    // then
    assertEquals(instance.getExample(), 14L, "The get example must be the same as the set one");
}
Also used : BaseIntegerProperty(io.swagger.models.properties.BaseIntegerProperty) Test(org.testng.annotations.Test)

Example 2 with BaseIntegerProperty

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

the class AbstractSerializableParameterTest method testGetDefaultWithBaseIntegerProperty.

@Test
public void testGetDefaultWithBaseIntegerProperty() {
    // given
    instance.setProperty(new BaseIntegerProperty());
    defaultValue = 14;
    // when
    instance.setDefault(defaultValue);
    // then
    assertEquals(instance.getDefault(), 14L, "The get default must be the same as the set one");
}
Also used : BaseIntegerProperty(io.swagger.models.properties.BaseIntegerProperty) Test(org.testng.annotations.Test)

Aggregations

BaseIntegerProperty (io.swagger.models.properties.BaseIntegerProperty)2 Test (org.testng.annotations.Test)2