Ejemplo n.º 1
0
        public void Invalid_Model_ThrowValidationErrors()
        {
            //arrange
            var model = new RegistrationViewModel();

            //act
            var results = TestModelHelper.Validate(model);

            //assert
            Assert.Equal(3, results.Count);
        }
Ejemplo n.º 2
0
        public void InValid_Passwords_ThrowValidationErrors()
        {
            //arrange
            var model = new RegistrationViewModel
            {
                Email = "*****@*****.**",
                RegistrationPassword = "******",
                ConfirmPassword      = "******"
            };

            //act
            var results = TestModelHelper.Validate(model);

            //assert
            Assert.Equal(1, results.Count);
        }