Пример #1
0
        public void ValidTask_ShouldPass()
        {
            Initialize();
            try
            {
                _context.TaskList.Add(taskList);
                _context.EFValidation();
            }
            catch (Exception e)
            {
                recordAccepted    = false;
                validationResults = e.GetBaseException().Message;
            }
            finally
            {
                Cleanup();
            }

            Assert.True(recordAccepted, validationResults);
        }
Пример #2
0
        public void Project_ValidProject_ShouldPass()
        {
            Initialise();
            try
            {
                _context.Project.Add(project);
                _context.EFValidation();
            }
            catch (Exception e)
            {
                recordAccepted    = false;
                validationResults = e.GetBaseException().Message;
            }
            finally
            {
                Cleanup();
            }

            Assert.True(recordAccepted, validationResults);
        }
Пример #3
0
        public void FirstNameValidations_ShouldNotPass(string value)
        {
            Initialize();
            person.FirstName = value;
            try
            {
                _context.Person.Add(person);
                _context.EFValidation();
            }
            catch (Exception e)
            {
                recordAccepted    = false;
                validationResults = e.GetBaseException().Message;
            }
            finally
            {
                Cleanup();
            }

            Assert.False(recordAccepted, validationResults);
        }