Package org.raml.model.parameter

Examples of org.raml.model.parameter.QueryParameter.validate()


        assertThat(nameParam.getExample(), is("two"));
        assertThat(nameParam.isRepeat(), is(false));
        assertThat(nameParam.isRequired(), is(false));
        assertThat(nameParam.getDefaultValue(), is("three"));

        assertThat(nameParam.validate("one"), is(true));
        assertThat(nameParam.validate("two"), is(true));
        assertThat(nameParam.validate("three"), is(true));
        assertThat(nameParam.validate("four"), is(false));
    }
View Full Code Here


        assertThat(nameParam.isRepeat(), is(false));
        assertThat(nameParam.isRequired(), is(false));
        assertThat(nameParam.getDefaultValue(), is("three"));

        assertThat(nameParam.validate("one"), is(true));
        assertThat(nameParam.validate("two"), is(true));
        assertThat(nameParam.validate("three"), is(true));
        assertThat(nameParam.validate("four"), is(false));
    }

    @Test
View Full Code Here

        assertThat(nameParam.isRequired(), is(false));
        assertThat(nameParam.getDefaultValue(), is("three"));

        assertThat(nameParam.validate("one"), is(true));
        assertThat(nameParam.validate("two"), is(true));
        assertThat(nameParam.validate("three"), is(true));
        assertThat(nameParam.validate("four"), is(false));
    }

    @Test
    public void integerType()
View Full Code Here

        assertThat(nameParam.getDefaultValue(), is("three"));

        assertThat(nameParam.validate("one"), is(true));
        assertThat(nameParam.validate("two"), is(true));
        assertThat(nameParam.validate("three"), is(true));
        assertThat(nameParam.validate("four"), is(false));
    }

    @Test
    public void integerType()
    {
View Full Code Here

        assertThat(ageParam.getExample(), is("2"));
        assertThat(ageParam.isRepeat(), is(false));
        assertThat(ageParam.isRequired(), is(false));
        assertThat(ageParam.getDefaultValue(), is("3"));

        assertThat(ageParam.validate("0"), is(true));
        assertThat(ageParam.validate("5.5"), is(false));
        assertThat(ageParam.validate("185"), is(true));
        assertThat(ageParam.validate("193"), is(false));
    }
View Full Code Here

        assertThat(ageParam.isRepeat(), is(false));
        assertThat(ageParam.isRequired(), is(false));
        assertThat(ageParam.getDefaultValue(), is("3"));

        assertThat(ageParam.validate("0"), is(true));
        assertThat(ageParam.validate("5.5"), is(false));
        assertThat(ageParam.validate("185"), is(true));
        assertThat(ageParam.validate("193"), is(false));
    }

    @Test
View Full Code Here

        assertThat(ageParam.isRequired(), is(false));
        assertThat(ageParam.getDefaultValue(), is("3"));

        assertThat(ageParam.validate("0"), is(true));
        assertThat(ageParam.validate("5.5"), is(false));
        assertThat(ageParam.validate("185"), is(true));
        assertThat(ageParam.validate("193"), is(false));
    }

    @Test
    public void numberType()
View Full Code Here

        assertThat(ageParam.getDefaultValue(), is("3"));

        assertThat(ageParam.validate("0"), is(true));
        assertThat(ageParam.validate("5.5"), is(false));
        assertThat(ageParam.validate("185"), is(true));
        assertThat(ageParam.validate("193"), is(false));
    }

    @Test
    public void numberType()
    {
View Full Code Here

        assertThat(priceParam.getExample(), is("17.30"));
        assertThat(priceParam.isRepeat(), is(false));
        assertThat(priceParam.isRequired(), is(false));
        assertThat(priceParam.getDefaultValue(), is("23.50"));

        assertThat(priceParam.validate("0.15"), is(true));
        assertThat(priceParam.validate("0.05"), is(false));
        assertThat(priceParam.validate("75.57"), is(true));
        assertThat(priceParam.validate("99.92"), is(false));
    }
View Full Code Here

        assertThat(priceParam.isRepeat(), is(false));
        assertThat(priceParam.isRequired(), is(false));
        assertThat(priceParam.getDefaultValue(), is("23.50"));

        assertThat(priceParam.validate("0.15"), is(true));
        assertThat(priceParam.validate("0.05"), is(false));
        assertThat(priceParam.validate("75.57"), is(true));
        assertThat(priceParam.validate("99.92"), is(false));
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.