7 instantiations of ContainsException
xunit.assert (7)
CollectionAsserts.cs (2)
274 throw new ContainsException(expected, collection); 295 throw new ContainsException("(filter expression)", collection);
DictionaryAsserts.cs (2)
43 throw new ContainsException(expected, collection.Keys); 69 throw new ContainsException(expected, collection.Keys);
SetAsserts.cs (2)
36 throw new ContainsException(expected, set); 55 throw new ContainsException(expected, set);
StringAsserts.cs (1)
52 throw new ContainsException(expectedSubstring, actualString);
34 references to ContainsException
Microsoft.DotNet.XUnitAssert.Tests (12)
CollectionAssertsTests.cs (9)
370 var ex = Assert.Throws<ContainsException>(() => Assert.Contains(42, list)); 435 var ex = Assert.IsType<ContainsException>(actual); 466 var ex = Assert.IsType<ContainsException>(actual); 493 var ex = Assert.Throws<ContainsException>(() => Assert.Contains("HI THERE", set, StringComparer.Ordinal)); 533 Assert.Throws<ContainsException>(() => Assert.Contains(list, item => item.StartsWith("q")));
StringAssertsTests.cs (3)
21 Assert.IsType<ContainsException>(ex); 33 Assert.Throws<ContainsException>(() => Assert.Contains("hey", "Hello, world!")); 39 Assert.Throws<ContainsException>(() => Assert.Contains("foo", (string?)null));
xunit.assert (22)
CollectionAsserts.cs (3)
227 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception> 262 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception> 283 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception>
DictionaryAsserts.cs (4)
30 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception> 56 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception> 82 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception> 101 /// <exception cref="ContainsException">Thrown when the object is not present in the collection</exception>
Sdk\Exceptions\ContainsException.cs (1)
18 /// Creates a new instance of the <see cref="ContainsException"/> class.
SetAsserts.cs (8)
27 /// <exception cref="ContainsException">Thrown when the object is not present in the set</exception> 46 /// <exception cref="ContainsException">Thrown when the object is not present in the set</exception> 65 /// <exception cref="ContainsException">Thrown when the object is not present in the set</exception> 127 /// <exception cref="ContainsException">Thrown when the object is not present in the set</exception> 153 /// <exception cref="ContainsException">Thrown when the actual set is not a proper subset of the expected set</exception> 174 /// <exception cref="ContainsException">Thrown when the actual set is not a proper superset of the expected set</exception> 195 /// <exception cref="ContainsException">Thrown when the actual set is not a subset of the expected set</exception> 216 /// <exception cref="ContainsException">Thrown when the actual set is not a superset of the expected set</exception>
StringAsserts.cs (6)
23 /// <exception cref="ContainsException">Thrown when the sub-string is not present inside the string</exception> 39 /// <exception cref="ContainsException">Thrown when the sub-string is not present inside the string</exception> 97 /// <exception cref="ContainsException">Thrown when the string does not start with the expected string</exception> 114 /// <exception cref="ContainsException">Thrown when the string does not start with the expected string</exception> 134 /// <exception cref="ContainsException">Thrown when the string does not end with the expected string</exception> 151 /// <exception cref="ContainsException">Thrown when the string does not end with the expected string</exception>