Package model.forms

Examples of model.forms.RegisterForm


public class RegistrationTest extends AbstractTest{

  @Test
    public void passwordMismatch() {
    RegisterForm registerForm = new RegisterForm();
    registerForm.email="susan.g.fung@gmail.com";
    registerForm.firstName="Susan";
    registerForm.lastName="Fung";
    registerForm.password="abc";
    registerForm.password2="abcd";
    String message = registerForm.validate();
    Assert.assertTrue(message.equals(ApplicationConstants.PASSWORD_MISMATCH));
    }
View Full Code Here


    Assert.assertTrue(message.equals(ApplicationConstants.PASSWORD_MISMATCH));
    }

  @Test
    public void userAlreadyRegistered() {
    RegisterForm registerForm = new RegisterForm();
    registerForm.email="sgf2110@columbia.edu";
    registerForm.firstName="Susan";
    registerForm.lastName="Fung";
    registerForm.password="abc";
    registerForm.password2="abc";
    registerForm.isEnabled=ApplicationConstants.TRUE;
    String message = registerForm.validate();
    Assert.assertTrue(message.equals(ApplicationConstants.USER_ALREADY_REGISTERED));
    }
View Full Code Here

    Assert.assertTrue(message.equals(ApplicationConstants.USER_ALREADY_REGISTERED));
    }

  @Test
    public void successRegistration() {
    RegisterForm registerForm = new RegisterForm();
    registerForm.email="susan.fung@gmail.com";
    registerForm.firstName="Susan";
    registerForm.lastName="Fung";
    registerForm.password="abc";
    registerForm.password2="abc";
    registerForm.isEnabled=ApplicationConstants.TRUE;
    String message = registerForm.validate();
    Assert.assertTrue(message == null);
    }
View Full Code Here

TOP

Related Classes of model.forms.RegisterForm

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.