3 instantiations of RaisesException
xunit.assert (3)
Sdk\Exceptions\RaisesException.cs (3)
36
new
RaisesException
(
52
new
RaisesException
("Assert.Raises() Failure: No event was raised");
60
new
RaisesException
(
41 references to RaisesException
Microsoft.DotNet.XUnitAssert.Tests (10)
Asserts\EventAssertsTests.cs (10)
21
Assert.IsType<
RaisesException
>(ex);
43
Assert.IsType<
RaisesException
>(ex);
78
Assert.IsType<
RaisesException
>(ex);
103
Assert.IsType<
RaisesException
>(ex);
143
Assert.IsType<
RaisesException
>(ex);
536
Assert.IsType<
RaisesException
>(ex);
558
Assert.IsType<
RaisesException
>(ex);
593
Assert.IsType<
RaisesException
>(ex);
618
Assert.IsType<
RaisesException
>(ex);
658
Assert.IsType<
RaisesException
>(ex);
xunit.assert (31)
EventAsserts.cs (25)
30
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
37
throw
RaisesException
.ForNoEvent();
48
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
54
var raisedEvent = RaisesInternal(attach, detach, testCode) ?? throw
RaisesException
.ForNoEvent(typeof(T));
57
throw
RaisesException
.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType());
70
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
76
var raisedEvent = RaisesInternal(attach, detach, testCode) ?? throw
RaisesException
.ForNoEvent(typeof(T));
79
throw
RaisesException
.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType());
93
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
104
var raisedEvent = RaisesInternal(handler, attach, detach, testCode) ?? throw
RaisesException
.ForNoEvent(typeof(T));
107
throw
RaisesException
.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType());
119
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
134
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
149
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
163
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
178
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
193
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
207
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
214
throw
RaisesException
.ForNoEvent();
225
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
231
var raisedEvent = await RaisesAsyncInternal(attach, detach, testCode) ?? throw
RaisesException
.ForNoEvent(typeof(T));
234
throw
RaisesException
.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType());
247
/// <exception cref="
RaisesException
">Thrown when the expected event was not raised.</exception>
253
var raisedEvent = await RaisesAsyncInternal(attach, detach, testCode) ?? throw
RaisesException
.ForNoEvent(typeof(T));
256
throw
RaisesException
.ForIncorrectType(typeof(T), raisedEvent.Arguments.GetType());
Sdk\Exceptions\RaisesException.cs (6)
28
/// Creates a new instance of the <see cref="
RaisesException
" /> class to be thrown when
33
public static
RaisesException
ForIncorrectType(
48
/// Creates a new instance of the <see cref="
RaisesException
" /> class to be thrown when
51
public static
RaisesException
ForNoEvent() =>
55
/// Creates a new instance of the <see cref="
RaisesException
" /> class to be thrown when
59
public static
RaisesException
ForNoEvent(Type expected) =>