OfType
ShouldBeOfType is the inverse of ShouldNotBeOfType.
ShouldBeOfType
var theSimpsonsDog = new Cat { Name = "Santas little helper" };
theSimpsonsDog.ShouldBeOfType<Dog>();Exception
theSimpsonsDog
should be of type
Simpsons.Dog
but was
Simpsons.CatShouldNotBeOfType
var theSimpsonsDog = new Cat { Name = "Santas little helper" };
theSimpsonsDog.ShouldNotBeOfType<Cat>();Exception
theSimpsonsDog
should not be of type
Simpsons.Cat
but was
Santas little helperLast updated