Ejemplo n.º 1
0
        public void Throws_An_Exception_When_Validating_Invalid_Assertions()
        {
            // Arrange
            Assertion validAssertion = CreateValidAssertion();
            Assertion invalidAssertion = CreateInvalidAssertion();

            var group = new AssertionGroup();
            group.Add(validAssertion);
            group.Add(invalidAssertion);

            var validator = new AssertionValidator(group);

            // Act/Assert
            Assert.Throws<AssertionInvalidException>(() => validator.Validate());
        }
Ejemplo n.º 2
0
        public void Does_Not_Throw_Any_Exception_When_Validating_Invalid_Assertions()
        {
            // Arrange
            Assertion firstValidAssertion = CreateValidAssertion();
            Assertion secondValidAssertion = CreateValidAssertion();

            var group = new AssertionGroup();
            group.Add(firstValidAssertion);
            group.Add(secondValidAssertion);

            var validator = new AssertionValidator(group);

            // Act/Assert
            Assert.DoesNotThrow(() => validator.Validate());
        }