Esempio n. 1
0
        public void AssertType_ShouldThrowExceptionGivenNotExpectedType()
        {
            //Arrange

            ValidationInfo subject = new ValidationInfo("_nameHere", typeof(Example));

            //Act
            Action action = () => subject.AssertType("");

            //Assert
            action.Should().Throw <Exception>().WithMessage("Expected [name=_nameHere] to be of [type=Example] but found [type=String]");
        }