Class RaisesException
Exception thrown when Assert.Raises fails.
public class RaisesException : XunitException, ISerializable, IAssertionException
- Inheritance
-
RaisesException
- Implements
- Inherited Members
Methods
ForIncorrectType(Type, Type)
Creates a new instance of the RaisesException class to be thrown when the raised event wasn't the expected type.
public static RaisesException ForIncorrectType(Type expected, Type actual)
Parameters
expectedTypeThe type of the event args that was expected
actualTypeThe type of the event args that was actually raised
Returns
ForNoEvent()
Creates a new instance of the RaisesException class to be thrown when no event (without data) was raised.
public static RaisesException ForNoEvent()
Returns
ForNoEvent(Type)
Creates a new instance of the RaisesException class to be thrown when no event (with data) was raised.
public static RaisesException ForNoEvent(Type expected)
Parameters
expectedTypeThe type of the event args that was expected