Esempio n. 1
0
        public void WhenDeletedUserAddressHaveNoDomain_ShouldHaveError()
        {
            var validator = new DeletedUserValidator();

            #region Init variables
            string address = "test@address";
            #endregion
            DeletedUser mailReadUpdate = new DeletedUser
            {
                Address = address
            };
            var result = validator.TestValidate(mailReadUpdate);
            #region Tests
            result.ShouldHaveValidationErrorFor(x => x.Address);
            #endregion
        }
Esempio n. 2
0
        public void WhenDeletedUserIsOk_ShouldNotHaveAnyError()
        {
            var validator = new DeletedUserValidator();

            #region Init variables
            string address = "*****@*****.**";
            #endregion
            DeletedUser mailReadUpdate = new DeletedUser
            {
                Address = address
            };
            var result = validator.TestValidate(mailReadUpdate);
            #region Tests
            result.ShouldNotHaveAnyValidationErrors();
            #endregion
        }