public void TestInitialize()
        {
            _practicionerValidator = new PracticionerValidator();
            _practicioners         = new List <Practicioner> {
                new Practicioner
                {
                    Enrollment = "zS19012344",
                    Term       = "FEBRERO - JULIO 2021",
                    Credits    = 285,
                    User       = new User
                    {
                        IdUser         = 1,
                        Name           = "Isamel",
                        LastName       = "Luna Ceballos",
                        Gender         = Gender.MALE,
                        UserStatus     = UserStatus.ACTIVE,
                        Email          = "*****@*****.**",
                        AlternateEmail = "*****@*****.**",
                        PhoneNumber    = "2289123456",
                        Account        = new Account
                        {
                            Username   = "******",
                            Password   = "******",
                            FirstLogin = true
                        }
                    }
                }
            };

            _mockSet     = DbContextMock.GetQueryableMockDbSet(_practicioners, p => p.Enrollment);
            _mockContext = DbContextMock.GetContext(_mockSet);
            _unitOfWork  = DbContextMock.GetUnitOfWork(_mockContext);
        }
示例#2
0
        public void TestInitialize()
        {
            _practicionerValidator = new PracticionerValidator();
            _practicioners         = new List <Practicioner> {
                new Practicioner
                {
                    Enrollment = "zS18012124",
                    Term       = "FEBRERO - JULIO 2021",
                    Credits    = 288,
                    User       = new User
                    {
                        IdUser         = 1,
                        Name           = "Anahi del Carmen",
                        LastName       = "Lune Herrera",
                        Gender         = Gender.FEMALE,
                        UserStatus     = UserStatus.ACTIVE,
                        Email          = "*****@*****.**",
                        AlternateEmail = "*****@*****.**",
                        PhoneNumber    = "2281564676",
                        Account        = new Account
                        {
                            Username   = "******",
                            Password   = "******",
                            FirstLogin = true
                        }
                    }
                }
            };

            _mockSet     = DbContextMock.GetQueryableMockDbSet(_practicioners, p => p.Enrollment);
            _mockContext = DbContextMock.GetContext(_mockSet);
            _unitOfWork  = DbContextMock.GetUnitOfWork(_mockContext);
        }
示例#3
0
        private bool IsValidData()
        {
            bool isValid = false;
            PracticionerValidator     practicionerDataValidator = new PracticionerValidator();
            ValidationResult          dataValidationResult      = practicionerDataValidator.Validate(Practicioner);
            IList <ValidationFailure> validationFailures        = dataValidationResult.Errors;
            UserFeedback userFeedback = new UserFeedback(FormGrid, validationFailures);

            userFeedback.ShowFeedback();
            if (ValidateGender() && dataValidationResult.IsValid)
            {
                isValid = true;
            }
            return(isValid);
        }