2 instantiations of SingleException
xunit.assert (2)
Sdk\Exceptions\SingleException.cs (2)
31 new SingleException($"The collection was expected to contain a single element{(expected == null ? "" : " matching " + expected)}, but it {(expected == null ? "was empty." : "contained no matching elements.")}"); 42 new SingleException($"The collection was expected to contain a single element{(expected == null ? "" : " matching " + expected)}, but it contained {count}{(expected == null ? "" : " matching")} elements.");
16 references to SingleException
Microsoft.DotNet.XUnitAssert.Tests (8)
CollectionAssertsTests.cs (8)
1167 Assert.IsType<SingleException>(ex); 1178 Assert.IsType<SingleException>(ex); 1234 Assert.IsType<SingleException>(ex); 1245 Assert.IsType<SingleException>(ex); 1265 Assert.IsType<SingleException>(ex); 1276 Assert.IsType<SingleException>(ex); 1327 Assert.IsType<SingleException>(ex); 1338 Assert.IsType<SingleException>(ex);
xunit.assert (8)
CollectionAsserts.cs (6)
525 /// <exception cref="SingleException">Thrown when the collection does not contain 546 /// <exception cref="SingleException">Thrown when the collection does not contain 568 /// <exception cref="SingleException">Thrown when the collection does not contain 587 /// <exception cref="SingleException">Thrown when the filtered collection does 620 throw SingleException.Empty(expectedArgument); 628 throw SingleException.MoreThanOne(count, expectedArgument);
Sdk\Exceptions\SingleException.cs (2)
24 /// Creates an instance of <see cref="SingleException"/> for when the collection didn't contain any of the expected value. 34 /// Creates an instance of <see cref="SingleException"/> for when the collection had too many of the expected items.