Skip to content

EnumerableAssertions<TSelf, TEnumerable, T>.AllBeOfType Method ​

Definition ​

Asserts that all items in the enumerable are of the specified type.

c#
public AssertionsChain<EnumerableAssertions<IReadOnlyList<TOther>, TOther>, IReadOnlyList<TOther>> AllBeOfType<TOther>()
   where TOther : T;

View source

Type Parameters ​

NameDescription
TOtherThe expected type.

Returns ​

AssertionsChain<EnumerableAssertions<IReadOnlyList<TOther>, TOther>, IReadOnlyList<TOther>>

An AssertionsChain<TAssertions, T> for chaining further assertions.