Skip to content

[Docs] ContainItemsAssignableTo #1841

@cheng93

Description

@cheng93

With the fixes for #1618 the docs need updating.

https://fluentassertions.com/tips/#collections

MSTest FluentAssertions
CollectionAssert.AllItemsAreInstancesOfType(actual, typeof(T)); actual.Should().ContainItemsAssignableTo<T>();
CollectionAssert.AllItemsAreInstancesOfType failed. Element at index 0 is not of expected type. Expected type:<UnitTests2.MyIdenticalClass>. Actual type:<UnitTests2.MyClass>. Expected collection to contain only items of type UnitTests2.MyIdenticalClass, but item SomeProperty: 1, OtherProperty: item at index 0 is of type UnitTests2.MyClass.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions