InterfaceIThrows<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(Exception)
Throws the specified exception when the arranged call occurs.
Declaration
IAssertable Throws(Exception exception)
Parameters
exception
Exception instance to throw.
Returns
The current expectation so that you can continue the arrangement.
Throws<TException>()
Throws a new exception of the specified type when the arranged call occurs.
Declaration
IAssertable Throws<TException>() where TException : Exception
Returns
The current expectation so that you can continue the arrangement.
Throws<TException>(params object[])
Throws a new exception of the specified type when the arranged call occurs.
Declaration
IAssertable Throws<TException>(params object[] args) where TException : Exception
Parameters
args
object[]
Returns
The current expectation so that you can continue the arrangement.
ThrowsAsync(Exception)
Faults the returned task with the specified exception when the arranged async call occurs.
Declaration
IAssertable ThrowsAsync(Exception exception)
Parameters
exception
Exception instance to use for the faulted task.
Returns
The current expectation so that you can continue the arrangement.
ThrowsAsync<TException>()
Faults the returned task with a new exception of the specified type when the arranged async call occurs.
Declaration
IAssertable ThrowsAsync<TException>() where TException : Exception
Returns
The current expectation so that you can continue the arrangement.
ThrowsAsync<TException>(params object[])
Faults the returned task with a new exception of the specified type when the arranged async call occurs.
Declaration
IAssertable ThrowsAsync<TException>(params object[] args) where TException : Exception
Parameters
args
object[]
Returns
The current expectation so that you can continue the arrangement.