mil.dod.th.ose.gui.webapp/test/mil/dod/th/ose/gui/webapp/utils/TestArgumentValidatorUtil.java
@Test
    public void testCheckShort()
    {
        Short value = 1021;
        String minValue = "500";
        String maxValue = "30000";
        
        //Check valid value returns true.
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.PASSED));
        
        //Check value below minimum returns false.
        value = 100;
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.LESS_THAN_MIN));
        
        //Check value above maximum returns false.
        value = 32767;
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.GREATER_THAN_MAX));
        
        //Check no min or max set returns true.
        minValue = null;
        maxValue = null;
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.PASSED));
    }
/**
     * Verify that the validator will return the correct response if a Short value is greater than or less than the 
     * range of acceptable values. 
     */
Verify that the validator will return the correct response if a Short value is greater than or less than the
range of acceptable values.
Verify that the validator will return the correct response if a Short value is greater than or less than the range of acceptable values .
@Test
    public void testCheckShort()
    {
        Short value = 1021;
        String minValue = "500";
        String maxValue = "30000";
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.PASSED));
        value = 100;
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.LESS_THAN_MIN));
        value = 32767;
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.GREATER_THAN_MAX));
        minValue = null;
        maxValue = null;
        assertThat(ArgumentValidatorUtil.checkShort(value, minValue, maxValue), is (ValidationEnum.PASSED));
    }
@ Test public void testCheckShort ( ) { Short value = 1021 ; String minValue = "500" ; String maxValue = "30000" ; assertThat ( ArgumentValidatorUtil . checkShort ( value , minValue , maxValue ) , is ( ValidationEnum . PASSED ) ) ; value = 100 ; assertThat ( ArgumentValidatorUtil . checkShort ( value , minValue , maxValue ) , is ( ValidationEnum . LESS_THAN_MIN ) ) ; value = 32767 ; assertThat ( ArgumentValidatorUtil . checkShort ( value , minValue , maxValue ) , is ( ValidationEnum . GREATER_THAN_MAX ) ) ; minValue = null ; maxValue = null ; assertThat ( ArgumentValidatorUtil . checkShort ( value , minValue , maxValue ) , is ( ValidationEnum . PASSED ) ) ; }
Verify that the validator will return the correct response if a Short value is greater than or less than the
 range of acceptable values.
Verify that the validator will return the correct response if a Short value is greater than or less than the range of acceptable values .
//Check valid value returns true. //Check value below minimum returns false. //Check value above maximum returns false. //Check no min or max set returns true.