/
collectionAssert.yml
133 lines (88 loc) · 4.15 KB
/
collectionAssert.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
- old: |
CollectionAssert.AllItemsAreUnique(actual);
new: |
actual.Should().OnlyHaveUniqueItems();
old-message: |
CollectionAssert.AllItemsAreUnique failed. Duplicate item found:<SomeProperty: 1, OtherProperty: item>.
new-message: |
Expected collection to only have unique items, but item SomeProperty: 1, OtherProperty: item is not unique.
- old: |
CollectionAssert.AreEqual(expected, actual);
new: |
actual.Should().Equal(expected);
old-message: |
CollectionAssert.AreEqual failed. (Element at index 0 do not match.)
new-message: |
Expected collection to be equal to {SomeProperty: 1, OtherProperty: item}, but {SomeProperty: 1, OtherProperty: different} differs at index 0.
- old: |
CollectionAssert.AreNotEqual(expected, actual);
new: |
actual.Should().NotEqual(expected);
old-message: |
CollectionAssert.AreNotEqual failed. (Both collection contain same elements.)
new-message: |
Did not expect collections {SomeProperty: 1, OtherProperty: item} and {SomeProperty: 1, OtherProperty: item} to be equal.
- old: |
CollectionAssert.AreEquivalent(expected, actual);
new: |
actual.Should().BeEquivalentTo(expected);
old-message: |
CollectionAssert.AreEquivalent failed. The expected collection contains 1 occurrence(s) of <SomeProperty: 2, OtherProperty: other>. The actual collection contains 0 occurrence(s).
new-message: |
Expected collection {SomeProperty: 1, OtherProperty: item, SomeProperty: 2, OtherProperty: item} to be equivalent to {SomeProperty: 1, OtherProperty: item, SomeProperty: 2, OtherProperty: other}, but it misses {SomeProperty: 2, OtherProperty: other}.
- old: |
CollectionAssert.AreNotEquivalent(expected, actual);
new: |
actual.Should().NotBeEquivalentTo(expected);
old-message: |
CollectionAssert.AreNotEquivalent failed. Both collections contain the same elements.
new-message: |
Expected collection {SomeProperty: 1, OtherProperty: item, SomeProperty: 2, OtherProperty: other} not be equivalent with collection {SomeProperty: 1, OtherProperty: item, SomeProperty: 2, OtherProperty: other}.
- old: |
CollectionAssert.Contains(actual, expected);
new: |
actual.Should().Contain(expected);
old-message: |
CollectionAssert.Contains failed.
new-message: |
Expected collection {SomeProperty: 2, OtherProperty: other} to contain SomeProperty: 1, OtherProperty: item.
- old: |
CollectionAssert.DoesNotContain(actual, expected);
new: |
actual.Should().NotContain(expected);
old-message: |
CollectionAssert.DoesNotContain failed.
new-message: |
Expected collection {SomeProperty: 1, OtherProperty: item} to not contain SomeProperty: 1, OtherProperty: item.
- old: |
CollectionAssert.IsSubsetOf(actual, expectedSuperset);
new: |
actual.Should().BeSubsetOf(expectedSuperset);
old-message: |
CollectionAssert.IsSubsetOf failed.
new-message: |
Expected collection to be a subset of {SomeProperty: 1, OtherProperty: item}, but items {SomeProperty: 2, OtherProperty: other} are not part of the superset.
- old: |
CollectionAssert.IsNotSubsetOf(actual, expectedSuperset);
new: |
actual.Should().NotBeSubsetOf(expectedSuperset);
old-message: |
CollectionAssert.IsNotSubsetOf failed.
new-message: |
Did not expect collection {SomeProperty: 1, OtherProperty: item} to be a subset of {SomeProperty: 1, OtherProperty: item}.
- old: |
CollectionAssert.AllItemsAreNotNull(actual);
new: |
actual.Should().NotContainNulls();
old-message: |
CollectionAssert.AllItemsAreNotNull failed.
new-message: |
Expected collection not to contain nulls, but found one at index 0.
- old: |
CollectionAssert.AllItemsAreInstancesOfType(actual, typeof(T));
new: |
actual.Should().ContainItemsAssignableTo<T>();
old-message: |
CollectionAssert.AllItemsAreInstancesOfType failed. Element at index 0 is not of expected type. Expected type:<UnitTests2.MyIdenticalClass>. Actual type:<UnitTests2.MyClass>.
new-message: |
Expected collection to contain only items of type UnitTests2.MyIdenticalClass, but item SomeProperty: 1, OtherProperty: item at index 0 is of type UnitTests2.MyClass.