112 references to XunitException
Aspire.EndToEnd.Tests (5)
tests\Shared\WorkloadTesting\AspireProject.cs (3)
117
throw new
XunitException
($"Expected to find a <TargetFramework> element in {csprojPath}: {csprojContent}");
121
throw new
XunitException
($"Expected to find exactly one <TargetFramework> element in {csprojPath}: {csprojContent}");
126
throw new
XunitException
($"Expected to find {tfmToUseString} but found '{matches[0].Groups["tfm"].Value}' in {csprojPath}: {csprojContent}");
tests\Shared\WorkloadTesting\BuildEnvironment.cs (1)
88
throw new
XunitException
(
tests\Shared\WorkloadTesting\TestExtensions.cs (1)
55
throw new
XunitException
($"[{message}]\nExpected: {expected}\nActual: {actual}");
Aspire.Playground.Tests (1)
Infrastructure\DistributedApplicationExtensions.cs (1)
160
throw new
XunitException
($"Error found in the logs: {log}");
Aspire.Workload.Tests (5)
tests\Shared\WorkloadTesting\AspireProject.cs (3)
117
throw new
XunitException
($"Expected to find a <TargetFramework> element in {csprojPath}: {csprojContent}");
121
throw new
XunitException
($"Expected to find exactly one <TargetFramework> element in {csprojPath}: {csprojContent}");
126
throw new
XunitException
($"Expected to find {tfmToUseString} but found '{matches[0].Groups["tfm"].Value}' in {csprojPath}: {csprojContent}");
tests\Shared\WorkloadTesting\BuildEnvironment.cs (1)
88
throw new
XunitException
(
tests\Shared\WorkloadTesting\TestExtensions.cs (1)
55
throw new
XunitException
($"[{message}]\nExpected: {expected}\nActual: {actual}");
IIS.NewHandler.FunctionalTests (1)
NewHandlerTests.cs (1)
42
throw new
XunitException
($"Could not find aspnetcorev2.dll loaded in process {result.HostProcess.ProcessName}");
IIS.NewShim.FunctionalTests (1)
NewShimTests.cs (1)
36
throw new
XunitException
($"Could not find aspnetcorev2_inprocess.dll loaded in process {result.HostProcess.ProcessName}");
IIS.Tests (1)
StrictTestServerTests.cs (1)
22
throw new
XunitException
($"Unexpected log: {writeContext}");
Microsoft.Arcade.Test.Common (1)
MockEngine.cs (1)
59
throw new
XunitException
("Task error: " + e.Message);
Microsoft.AspNetCore.App.UnitTests (3)
AssertEx.cs (3)
14
throw new
XunitException
($"Expected directory to exist at {path} but it did not");
22
throw new
XunitException
($"Expected file to exist at {path} but it did not");
30
throw new
XunitException
($"File should not exist at {path}");
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
220
throw new
XunitException
("Invalid Set-Cookie header!");
1475
throw new
XunitException
("Invalid Set-Cookie header!");
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
HtmlGenerationWithCultureTest.cs (1)
179
throw new
XunitException
($"Unexpected correlation Id, reading values from document:{Environment.NewLine}{documentContent}");
Microsoft.AspNetCore.Routing.Tests (7)
Matching\MatcherAssert.cs (7)
21
throw new
XunitException
(
48
throw new
XunitException
("Keys and Values must be the same length.");
63
throw new
XunitException
($"Was expected to match '{expected.DisplayName}' but did not match.");
70
throw new
XunitException
("RouteValues is null.");
75
throw new
XunitException
(
87
throw new
XunitException
(
98
throw new
XunitException
(
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
TestHelpers\AssertExtensions.cs (2)
15
throw new
XunitException
($"Expected length to be {expected.Length} but was {actual.Length}");
22
throw new
XunitException
($@"Expected byte at index {i} to be '{expected[i]}' but was '{actual[i]}'");
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (1)
Ordering\LongRunningNonMutatingRequestHandler.cs (1)
43
throw new
XunitException
("Somehow we got past an infinite delay without cancelling. This is unexpected");
Microsoft.CodeAnalysis.Test.Utilities (2)
Assert\AssertEx.cs (2)
551
throw new Xunit.Sdk.
XunitException
(message);
556
throw new Xunit.Sdk.
XunitException
(string.Format(format, args));
Microsoft.Extensions.AI.Abstractions.Tests (6)
AssertExtensions.cs (3)
32
throw new
XunitException
($"Expected parameter '{expectedEntry.Key}' not found in actual value.");
45
throw new
XunitException
($"Actual value contains additional parameters {string.Join(", ", extraParameters)} not found in expected value.");
66
throw new
XunitException
(message);
test\Shared\JsonSchemaExporter\SchemaTestHelpers.cs (3)
21
throw new
XunitException
($"""
40
throw new
XunitException
($"""
57
throw new
XunitException
($"""
Microsoft.Extensions.AI.AzureAIInference.Tests (3)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (3)
32
throw new
XunitException
($"Expected parameter '{expectedEntry.Key}' not found in actual value.");
45
throw new
XunitException
($"Actual value contains additional parameters {string.Join(", ", extraParameters)} not found in expected value.");
66
throw new
XunitException
(message);
Microsoft.Extensions.AI.Ollama.Tests (3)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (3)
32
throw new
XunitException
($"Expected parameter '{expectedEntry.Key}' not found in actual value.");
45
throw new
XunitException
($"Actual value contains additional parameters {string.Join(", ", extraParameters)} not found in expected value.");
66
throw new
XunitException
(message);
Microsoft.Extensions.AI.OpenAI.Tests (3)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (3)
32
throw new
XunitException
($"Expected parameter '{expectedEntry.Key}' not found in actual value.");
45
throw new
XunitException
($"Actual value contains additional parameters {string.Join(", ", extraParameters)} not found in expected value.");
66
throw new
XunitException
(message);
Microsoft.Extensions.AI.Tests (3)
test\Libraries\Microsoft.Extensions.AI.Abstractions.Tests\AssertExtensions.cs (3)
32
throw new
XunitException
($"Expected parameter '{expectedEntry.Key}' not found in actual value.");
45
throw new
XunitException
($"Actual value contains additional parameters {string.Join(", ", extraParameters)} not found in expected value.");
66
throw new
XunitException
(message);
Microsoft.ML.TestFramework (1)
RemoteExecutor.cs (1)
158
internal RemoteExecutionException(string stackTrace) :
base
($"Remote process failed with an unhandled exception. {stackTrace}") { }
Shared.Tests (3)
JsonSchemaExporter\SchemaTestHelpers.cs (3)
21
throw new
XunitException
($"""
40
throw new
XunitException
($"""
57
throw new
XunitException
($"""
System.Drawing.Common.Tests (2)
Helpers.cs (1)
129
throw new
XunitException
("The entire image was blank.");
System\Drawing\GdiPlusHandlesTests.cs (1)
55
throw new
XunitException
($"GetGuiResources failed with win32 error: {error}");
System.Windows.Forms.Interop.Tests (1)
InteropTestBase.cs (1)
17
throw new
XunitException
(result);
System.Windows.Forms.Primitives.TestUtilities (18)
Extensions\AssertExtensions.cs (18)
222
throw new
XunitException
($"Expected one of: ({string.Join<Type>(", ", exceptionTypes)}) -> Actual: ({exceptionType}): {e}"); // Log message and callstack to help diagnosis
225
throw new
XunitException
($"Expected one of: ({string.Join<Type>(", ", exceptionTypes)}) -> Actual: No exception thrown");
314
throw new
XunitException
(
320
throw new
XunitException
(AddOptionalUserMessage($"Expected: {actual} to be greater than {greaterThan}", userMessage));
334
throw new
XunitException
(AddOptionalUserMessage($"Expected: <null> to be less than <null>.", userMessage));
344
throw new
XunitException
(AddOptionalUserMessage($"Expected: {actual} to be less than {lessThan}", userMessage));
359
throw new
XunitException
(AddOptionalUserMessage($"Expected: {actual} to be less than or equal to {lessThanOrEqualTo}", userMessage));
380
throw new
XunitException
(AddOptionalUserMessage($"Expected: <null> to be greater than or equal to <null>.", userMessage));
385
throw new
XunitException
(AddOptionalUserMessage($"Expected: {actual} to be greater than or equal to {greaterThanOrEqualTo}", userMessage));
413
throw new
XunitException
($"Expected: {string.Join(", ", expected)}{Environment.NewLine}Actual: {string.Join(", ", actual)}");
449
throw new
XunitException
($"Expected count: {expectedCount}{Environment.NewLine}Actual count: {actualCount}");
457
throw new
XunitException
($"Expected: {currentExpectedItem} but not found");
462
throw new
XunitException
($"Collections are not equal.{Environment.NewLine}Totally {countInfo.Original} {currentExpectedItem} in actual collection but expect more {currentExpectedItem}");
483
throw new
XunitException
($"Expected: Span of length {expected.Length}{Environment.NewLine}Actual: Span of length {actual.Length}");
507
throw new
XunitException
(message);
520
throw new
XunitException
($"Expected {expected?.ToString() ?? "null"} at position {i}; actual {actual[i]?.ToString() ?? "null"}");
533
throw new
XunitException
($"Expected: {expected1} || {expected2}{Environment.NewLine}Actual: {value}");
547
throw new
XunitException
($"""
xunit.assert (36)
Sdk\Exceptions\AllException.cs (1)
28
base
(message)
Sdk\Exceptions\CollectionException.cs (1)
39
base
(message)
Sdk\Exceptions\ContainsException.cs (1)
28
base
(message)
Sdk\Exceptions\DistinctException.cs (1)
26
base
(message)
Sdk\Exceptions\DoesNotContainException.cs (1)
30
base
(message)
Sdk\Exceptions\DoesNotMatchException.cs (1)
27
base
(message)
Sdk\Exceptions\EmptyException.cs (1)
27
base
(message)
Sdk\Exceptions\EndsWithException.cs (1)
27
base
(message)
Sdk\Exceptions\FailException.cs (1)
23
base
(message)
Sdk\Exceptions\FalseException.cs (1)
26
base
(message)
Sdk\Exceptions\InRangeException.cs (1)
26
base
(message)
Sdk\Exceptions\IsAssignableFromException.cs (1)
29
base
(message)
Sdk\Exceptions\IsNotAssignableFromException.cs (1)
26
base
(message)
Sdk\Exceptions\IsNotTypeException.cs (1)
27
base
(message)
Sdk\Exceptions\IsTypeException.cs (1)
26
base
(message)
Sdk\Exceptions\MatchesException.cs (1)
26
base
(message)
Sdk\Exceptions\MultipleException.cs (1)
29
base
("Assert.Multiple() Failure: Multiple failures were encountered")
Sdk\Exceptions\NotEmptyException.cs (1)
23
base
(message)
Sdk\Exceptions\NotInRangeException.cs (1)
26
base
(message)
Sdk\Exceptions\NotNullException.cs (1)
26
base
(message)
Sdk\Exceptions\NotSameException.cs (1)
23
base
(message)
Sdk\Exceptions\NotStrictEqualException.cs (1)
26
base
(message)
Sdk\Exceptions\NullException.cs (1)
30
base
(message)
Sdk\Exceptions\ProperSubsetException.cs (1)
26
base
(message)
Sdk\Exceptions\ProperSupersetException.cs (1)
26
base
(message)
Sdk\Exceptions\PropertyChangedException.cs (1)
25
base
(message)
Sdk\Exceptions\RaisesAnyException.cs (1)
26
base
(message)
Sdk\Exceptions\RaisesException.cs (1)
26
base
(message)
Sdk\Exceptions\SameException.cs (1)
26
base
(message)
Sdk\Exceptions\SingleException.cs (1)
29
:
base
(errorMessage)
Sdk\Exceptions\SkipException.cs (1)
25
base
(message)
Sdk\Exceptions\StartsWithException.cs (1)
27
base
(message)
Sdk\Exceptions\StrictEqualException.cs (1)
26
base
(message)
Sdk\Exceptions\SubsetException.cs (1)
26
base
(message)
Sdk\Exceptions\SupersetException.cs (1)
26
base
(message)
Sdk\Exceptions\TrueException.cs (1)
26
base
(message)