Package org.openengsb.ui.common.editor

Examples of org.openengsb.ui.common.editor.NumberValidator


public class NumberValidatorTest {

    @Test
    public void testPassLetterInsteadOfNumber_shouldNotValidateAndGiveErrorMessage() throws Exception {
        NumberValidator numberValidator = new NumberValidator();
        SingleAttributeValidationResult validate = numberValidator.validate("A");
        assertFalse(validate.isValid());
        assertEquals("validation.number.formating", validate.getErrorMessageId());
    }
View Full Code Here


    // TODO: [OPENENGSB-1250] public void testUsingEnglishLocale_shouldReturnEnglishMessage()

    @Test
    public void testValidateNumber_shouldReturnValidAndNoErrorMessage() throws Exception {
        NumberValidator validator = new NumberValidator();
        SingleAttributeValidationResult validate = validator.validate("123");
        assertTrue(validate.isValid());
        assertEquals("", validate.getErrorMessageId());
    }
View Full Code Here

TOP

Related Classes of org.openengsb.ui.common.editor.NumberValidator

Copyright © 2018 www.massapicom. 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.