Ejemplo n.º 1
0
        public void UserNameIsNull()
        {
            var afuser    = new AfUserModelCreate();
            var validator = new AfUserValidator();

            // var results = validator.Validate(afuser); // Validate(afuser, ruleSet: "all");
            validator.ShouldHaveValidationErrorFor(xx => xx.UserName, null as string);
        }
Ejemplo n.º 2
0
        public void UserNameHasADomain()
        {
            var afuser    = new AfUserModelCreate();
            var validator = new AfUserValidator();

            // Reload the data from the initial load
            _fixture.RefreshContext();
            // var results = validator.Validate(afuser); // Validate(afuser, ruleSet: "all");
            validator.ShouldHaveValidationErrorFor(xx => xx.UserName, "AdviceFirst\\jeco.jacob" as string);
        }