Пример #1
0
        public void AnswerModelValidator_When_IsCorrectIsNotNull_Should_NotHaveError()
        {
            // Arrange
            bool valueOfTruth = (randomBetween(0, 1) == 1);

            // Act
            AnswerModelValidator answerModelValidator = new AnswerModelValidator();

            // Assert
            answerModelValidator.ShouldNotHaveValidationErrorFor(x => x.IsCorrect, valueOfTruth);
        }
Пример #2
0
        public void AnswerModelValidator_When_AnswerTextPerfect_Should_NotHaveError()
        {
            // Arrange
            var answerText = stringOfLength(randomBetween(1, 50));

            // Act
            AnswerModelValidator answerModelValidator = new AnswerModelValidator();

            // Assert
            answerModelValidator.ShouldNotHaveValidationErrorFor(x => x.AnswerText, answerText);
        }