MrKWatkins.Assertions 0.0.21 Help

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

ObjectAssertions<T>

Should(Exception)

public static ExceptionAssertions<Exception> Should(this Exception? value);

Parameters

Name

Type

Description

value

Exception

Returns

ExceptionAssertions<Exception>

Should(ArgumentException)

public static ExceptionAssertions<ArgumentException> Should(this ArgumentException? value);

Parameters

Name

Type

Description

value

ArgumentException

Returns

ExceptionAssertions<ArgumentException>

Should(ArgumentOutOfRangeException)

public static ExceptionAssertions<ArgumentOutOfRangeException> Should(this ArgumentOutOfRangeException? value);

Parameters

Name

Type

Description

value

ArgumentOutOfRangeException

Returns

ExceptionAssertions<ArgumentOutOfRangeException>

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

IEnumerable<T>

Returns

EnumerableAssertions<IEnumerable<T>, T>

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

IReadOnlyDictionary<TKey, TValue>

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

Dictionary<TKey, TValue>

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

ReadOnlySpan<T>

Returns

ReadOnlySpanAssertions<T>

Should(Action)

public static ActionAssertions Should(this Action value);

Parameters

Name

Type

Description

value

Action

Returns

ActionAssertions

Last modified: 29 January 2025