use of org.mamute.validators.EmailValidator in project mamute by caelum.
the class EmailValidatorTest method setup.
@Before
public void setup() {
users = mock(UserDAO.class);
messageFactory = mock(MessageFactory.class);
validator = new MockValidator();
emailValidator = new EmailValidator(validator, users, messageFactory);
existant = "existant@brutal.com";
unexistant = "unexistant@brutal.com";
when(users.existsWithEmail(existant)).thenReturn(true);
when(users.existsWithEmail(unexistant)).thenReturn(false);
when(users.existsWithEmail(null)).thenReturn(false);
}
Aggregations