IThrows<TContainer>
Provides methods for arranging exceptions to be thrown when a mocked member is called.
Definition
Namespace:Telerik.JustMock.Expectations.Abstraction
Assembly:Telerik.JustMock.dll
Type Parameters:
TContainer
Expectation type that continues the arrangement.
Syntax:
public interface IThrows<TContainer>
Derived Classes:
Methods
Throws the specified exception when the arranged call occurs.
IAssertable Throws(Exception exception)
Exception instance to throw.
Returns:The current expectation so that you can continue the arrangement.
Throws a new exception of the specified type when the arranged call occurs.
IAssertable Throws<TException>() where TException : Exception
The current expectation so that you can continue the arrangement.
Throws a new exception of the specified type when the arranged call occurs.
IAssertable Throws<TException>(params object[] args) where TException : Exception
The current expectation so that you can continue the arrangement.
Faults the returned task with the specified exception when the arranged async call occurs.
IAssertable ThrowsAsync(Exception exception)
Exception instance to use for the faulted task.
Returns:The current expectation so that you can continue the arrangement.
Faults the returned task with a new exception of the specified type when the arranged async call occurs.
IAssertable ThrowsAsync<TException>() where TException : Exception
The current expectation so that you can continue the arrangement.
Faults the returned task with a new exception of the specified type when the arranged async call occurs.
IAssertable ThrowsAsync<TException>(params object[] args) where TException : Exception
The current expectation so that you can continue the arrangement.