ShouldExtensions.Should Method
Overloads
Should<T>(T)
public static ObjectAssertions<T> Should<T>(this T? value);
Type Parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
value | T |
Returns
Should(Exception)
public static ExceptionAssertions<Exception> Should(this Exception? value);
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
Should(ArgumentException)
public static ExceptionAssertions<ArgumentException> Should(this ArgumentException? value);
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
Should(ArgumentOutOfRangeException)
public static ExceptionAssertions<ArgumentOutOfRangeException> Should(this ArgumentOutOfRangeException? value);
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
Should<T>(IEnumerable<T>)
public static EnumerableAssertions<IEnumerable<T>, T> Should<T>(this IEnumerable<T>? value);
Type Parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
Should<TKey, TValue>(IReadOnlyDictionary<TKey, TValue>)
public static ReadOnlyDictionaryAssertions<IReadOnlyDictionary<TKey, TValue>, TKey, TValue> Should<TKey, TValue>(this IReadOnlyDictionary<TKey, TValue> value);
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
ReadOnlyDictionaryAssertions<IReadOnlyDictionary<TKey, TValue>, TKey, TValue>
Should<TKey, TValue>(Dictionary<TKey, TValue>)
public static ReadOnlyDictionaryAssertions<Dictionary<TKey, TValue>, TKey, TValue> Should<TKey, TValue>(this Dictionary<TKey, TValue> value);
Type Parameters
Name | Description |
---|---|
TKey | |
TValue |
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
ReadOnlyDictionaryAssertions<Dictionary<TKey, TValue>, TKey, TValue>
Should<T>(ReadOnlySpan<T>)
public static ReadOnlySpanAssertions<T> Should<T>(this ReadOnlySpan<T> value);
Type Parameters
Name | Description |
---|---|
T |
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
Should(Action)
public static ActionAssertions Should(this Action value);
Parameters
Name | Type | Description |
---|---|---|
value |
Returns
Last modified: 29 January 2025