Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update migration tip on how to replace AllItemsAreInstancesOfType #1873

Merged
merged 3 commits into from Apr 2, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 12 additions & 0 deletions docs/_data/tips/collections.yml
Expand Up @@ -179,6 +179,18 @@
new-message: |
Expected collection to contain a single item, but found {"", "", ""}.

- old: |
actual.Any(item => typeof(string).IsAssignableFrom(item.GetType())).Should().BeTrue();

new: |
actual.Should().ContainItemsAssignableTo<string>();

old-message: |
Expected True, but found False.

new-message: |
Expected collection to contain at least one element assignable to type "System.String", but found {System.Int32}.

- old: |
actual.Should().HaveCount(0);

Expand Down