Package org.jtalks.jcommune.web.validation.validators

Examples of org.jtalks.jcommune.web.validation.validators.ValidUserContactValidator


    }
   
    @BeforeMethod
    public void setUp() throws NotFoundException {
        initMocks(this);
        validator = new ValidUserContactValidator();
       
        UserContactType validContactType = new UserContactType();
        validContactType.setId(TYPE_ID_VALID);
        validContactType.setValidationPattern(VALID_PATTERN);
        UserContactType nullPatternContactType = new UserContactType();
        nullPatternContactType.setId(TYPE_ID_NULL_PATTERN);
        nullPatternContactType.setValidationPattern(null);
    when(contactsService.get(TYPE_ID_VALID)).thenReturn(validContactType);
    when(contactsService.get(TYPE_ID_NULL_PATTERN)).thenReturn(nullPatternContactType);
    when(contactsService.get(TYPE_ID_NON_EXISTENT)).thenThrow(new NotFoundException());
    validator = new ValidUserContactValidator();
    validator.setContactsService(contactsService);
    }
View Full Code Here

TOP

Related Classes of org.jtalks.jcommune.web.validation.validators.ValidUserContactValidator

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.