46 types derived from XunitException
System.Windows.Forms.Primitives.TestUtilities (1)
Metafiles\Validators\EmfValidator.WrappedXunitException.cs (1)
12private class WrappedXunitException : XunitException
Templates.Blazor.WebAssembly.Auth.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
15public class BrowserAssertFailedException : XunitException
Templates.Blazor.WebAssembly.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
15public class BrowserAssertFailedException : XunitException
Templates.Mvc.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
15public class BrowserAssertFailedException : XunitException
Templates.Tests (1)
src\Shared\E2ETesting\BrowserAssertFailedException.cs (1)
15public class BrowserAssertFailedException : XunitException
xunit.assert (41)
Sdk\Exceptions\AllException.cs (1)
25 partial class AllException : XunitException
Sdk\Exceptions\CollectionException.cs (1)
34 partial class CollectionException : XunitException
Sdk\Exceptions\ContainsException.cs (1)
25 partial class ContainsException : XunitException
Sdk\Exceptions\DistinctException.cs (1)
23 partial class DistinctException : XunitException
Sdk\Exceptions\DoesNotContainException.cs (1)
27 partial class DoesNotContainException : XunitException
Sdk\Exceptions\DoesNotMatchException.cs (1)
24 partial class DoesNotMatchException : XunitException
Sdk\Exceptions\EmptyException.cs (1)
24 partial class EmptyException : XunitException
Sdk\Exceptions\EndsWithException.cs (1)
24 partial class EndsWithException : XunitException
Sdk\Exceptions\EqualException.cs (1)
29 partial class EqualException : XunitException
Sdk\Exceptions\EquivalentException.cs (1)
29 partial class EquivalentException : XunitException
Sdk\Exceptions\FailException.cs (1)
20 partial class FailException : XunitException
Sdk\Exceptions\FalseException.cs (1)
23 partial class FalseException : XunitException
Sdk\Exceptions\InRangeException.cs (1)
23 partial class InRangeException : XunitException
Sdk\Exceptions\IsAssignableFromException.cs (1)
26 partial class IsAssignableFromException : XunitException
Sdk\Exceptions\IsNotAssignableFromException.cs (1)
23 partial class IsNotAssignableFromException : XunitException
Sdk\Exceptions\IsNotTypeException.cs (1)
24 partial class IsNotTypeException : XunitException
Sdk\Exceptions\IsTypeException.cs (1)
23 partial class IsTypeException : XunitException
Sdk\Exceptions\MatchesException.cs (1)
23 partial class MatchesException : XunitException
Sdk\Exceptions\MultipleException.cs (1)
26 partial class MultipleException : XunitException
Sdk\Exceptions\NotEmptyException.cs (1)
20 partial class NotEmptyException : XunitException
Sdk\Exceptions\NotEqualException.cs (1)
28 partial class NotEqualException : XunitException
Sdk\Exceptions\NotInRangeException.cs (1)
23 partial class NotInRangeException : XunitException
Sdk\Exceptions\NotNullException.cs (1)
23 partial class NotNullException : XunitException
Sdk\Exceptions\NotSameException.cs (1)
20 partial class NotSameException : XunitException
Sdk\Exceptions\NotStrictEqualException.cs (1)
23 partial class NotStrictEqualException : XunitException
Sdk\Exceptions\NullException.cs (1)
27 partial class NullException : XunitException
Sdk\Exceptions\ProperSubsetException.cs (1)
23 partial class ProperSubsetException : XunitException
Sdk\Exceptions\ProperSupersetException.cs (1)
23 partial class ProperSupersetException : XunitException
Sdk\Exceptions\PropertyChangedException.cs (1)
22 partial class PropertyChangedException : XunitException
Sdk\Exceptions\RaisesAnyException.cs (1)
23 partial class RaisesAnyException : XunitException
Sdk\Exceptions\RaisesException.cs (1)
23 partial class RaisesException : XunitException
Sdk\Exceptions\SameException.cs (1)
23 partial class SameException : XunitException
Sdk\Exceptions\SingleException.cs (1)
26 partial class SingleException : XunitException
Sdk\Exceptions\SkipException.cs (1)
22 partial class SkipException : XunitException
Sdk\Exceptions\StartsWithException.cs (1)
24 partial class StartsWithException : XunitException
Sdk\Exceptions\StrictEqualException.cs (1)
23 partial class StrictEqualException : XunitException
Sdk\Exceptions\SubsetException.cs (1)
23 partial class SubsetException : XunitException
Sdk\Exceptions\SupersetException.cs (1)
23 partial class SupersetException : XunitException
Sdk\Exceptions\ThrowsAnyException.cs (1)
26 partial class ThrowsAnyException : XunitException
Sdk\Exceptions\ThrowsException.cs (1)
26 partial class ThrowsException : XunitException
Sdk\Exceptions\TrueException.cs (1)
23 partial class TrueException : XunitException
57 instantiations of XunitException
Aspire.EndToEnd.Tests (5)
tests\Shared\WorkloadTesting\AspireProject.cs (3)
117throw new XunitException($"Expected to find a <TargetFramework> element in {csprojPath}: {csprojContent}"); 121throw new XunitException($"Expected to find exactly one <TargetFramework> element in {csprojPath}: {csprojContent}"); 126throw new XunitException($"Expected to find {tfmToUseString} but found '{matches[0].Groups["tfm"].Value}' in {csprojPath}: {csprojContent}");
tests\Shared\WorkloadTesting\BuildEnvironment.cs (1)
88throw new XunitException(
tests\Shared\WorkloadTesting\TestExtensions.cs (1)
55throw new XunitException($"[{message}]\nExpected: {expected}\nActual: {actual}");
Aspire.Playground.Tests (4)
AppHostTests.cs (3)
65throw new XunitException(sb.ToString(), te); 109throw new XunitException($"Endpoint '{client.BaseAddress}{path.TrimStart('/')}' for resource '{resource}' in app '{Path.GetFileNameWithoutExtension(appHostPath)}' timed out", tre); 284throw new XunitException($"Timed out waiting for the consumer message to be logged: '{consumerMessage}'", te);
Infrastructure\DistributedApplicationExtensions.cs (1)
160throw new XunitException($"Error found in the logs: {log}");
Aspire.Workload.Tests (5)
tests\Shared\WorkloadTesting\AspireProject.cs (3)
117throw new XunitException($"Expected to find a <TargetFramework> element in {csprojPath}: {csprojContent}"); 121throw new XunitException($"Expected to find exactly one <TargetFramework> element in {csprojPath}: {csprojContent}"); 126throw new XunitException($"Expected to find {tfmToUseString} but found '{matches[0].Groups["tfm"].Value}' in {csprojPath}: {csprojContent}");
tests\Shared\WorkloadTesting\BuildEnvironment.cs (1)
88throw new XunitException(
tests\Shared\WorkloadTesting\TestExtensions.cs (1)
55throw new XunitException($"[{message}]\nExpected: {expected}\nActual: {actual}");
IIS.NewHandler.FunctionalTests (1)
NewHandlerTests.cs (1)
42throw new XunitException($"Could not find aspnetcorev2.dll loaded in process {result.HostProcess.ProcessName}");
IIS.NewShim.FunctionalTests (1)
NewShimTests.cs (1)
36throw new XunitException($"Could not find aspnetcorev2_inprocess.dll loaded in process {result.HostProcess.ProcessName}");
IIS.Tests (1)
StrictTestServerTests.cs (1)
22throw new XunitException($"Unexpected log: {writeContext}");
Microsoft.Arcade.Test.Common (1)
MockEngine.cs (1)
59throw new XunitException("Task error: " + e.Message);
Microsoft.AspNetCore.App.UnitTests (3)
AssertEx.cs (3)
14throw new XunitException($"Expected directory to exist at {path} but it did not"); 22throw new XunitException($"Expected file to exist at {path} but it did not"); 30throw new XunitException($"File should not exist at {path}");
Microsoft.AspNetCore.Identity.FunctionalTests (2)
MapIdentityApiTests.cs (2)
220throw new XunitException("Invalid Set-Cookie header!"); 1475throw new XunitException("Invalid Set-Cookie header!");
Microsoft.AspNetCore.Mvc.FunctionalTests (1)
HtmlGenerationWithCultureTest.cs (1)
179throw new XunitException($"Unexpected correlation Id, reading values from document:{Environment.NewLine}{documentContent}");
Microsoft.AspNetCore.Routing.Tests (7)
Matching\MatcherAssert.cs (7)
21throw new XunitException( 48throw new XunitException("Keys and Values must be the same length."); 63throw new XunitException($"Was expected to match '{expected.DisplayName}' but did not match."); 70throw new XunitException("RouteValues is null."); 75throw new XunitException( 87throw new XunitException( 98throw new XunitException(
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (2)
TestHelpers\AssertExtensions.cs (2)
15throw new XunitException($"Expected length to be {expected.Length} but was {actual.Length}"); 22throw 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)
43throw new XunitException("Somehow we got past an infinite delay without cancelling. This is unexpected");
Microsoft.CodeAnalysis.Test.Utilities (2)
Assert\AssertEx.cs (2)
551throw new Xunit.Sdk.XunitException(message); 556throw new Xunit.Sdk.XunitException(string.Format(format, args));
System.Drawing.Common.Tests (2)
Helpers.cs (1)
129throw new XunitException("The entire image was blank.");
System\Drawing\GdiPlusHandlesTests.cs (1)
55throw new XunitException($"GetGuiResources failed with win32 error: {error}");
System.Windows.Forms.Interop.Tests (1)
InteropTestBase.cs (1)
17throw new XunitException(result);
System.Windows.Forms.Primitives.TestUtilities (18)
Extensions\AssertExtensions.cs (18)
222throw new XunitException($"Expected one of: ({string.Join<Type>(", ", exceptionTypes)}) -> Actual: ({exceptionType}): {e}"); // Log message and callstack to help diagnosis 225throw new XunitException($"Expected one of: ({string.Join<Type>(", ", exceptionTypes)}) -> Actual: No exception thrown"); 314throw new XunitException( 320throw new XunitException(AddOptionalUserMessage($"Expected: {actual} to be greater than {greaterThan}", userMessage)); 334throw new XunitException(AddOptionalUserMessage($"Expected: <null> to be less than <null>.", userMessage)); 344throw new XunitException(AddOptionalUserMessage($"Expected: {actual} to be less than {lessThan}", userMessage)); 359throw new XunitException(AddOptionalUserMessage($"Expected: {actual} to be less than or equal to {lessThanOrEqualTo}", userMessage)); 380throw new XunitException(AddOptionalUserMessage($"Expected: <null> to be greater than or equal to <null>.", userMessage)); 385throw new XunitException(AddOptionalUserMessage($"Expected: {actual} to be greater than or equal to {greaterThanOrEqualTo}", userMessage)); 413throw new XunitException($"Expected: {string.Join(", ", expected)}{Environment.NewLine}Actual: {string.Join(", ", actual)}"); 449throw new XunitException($"Expected count: {expectedCount}{Environment.NewLine}Actual count: {actualCount}"); 457throw new XunitException($"Expected: {currentExpectedItem} but not found"); 462throw new XunitException($"Collections are not equal.{Environment.NewLine}Totally {countInfo.Original} {currentExpectedItem} in actual collection but expect more {currentExpectedItem}"); 483throw new XunitException($"Expected: Span of length {expected.Length}{Environment.NewLine}Actual: Span of length {actual.Length}"); 507throw new XunitException(message); 520throw new XunitException($"Expected {expected?.ToString() ?? "null"} at position {i}; actual {actual[i]?.ToString() ?? "null"}"); 533throw new XunitException($"Expected: {expected1} || {expected2}{Environment.NewLine}Actual: {value}"); 547throw new XunitException($"""
29 references to XunitException
Microsoft.AspNetCore.FunctionalTests (5)
WebHostFunctionalTests.cs (5)
49catch (XunitException) 74catch (XunitException) 98catch (XunitException) 175catch (XunitException) 195catch (XunitException)
Microsoft.AspNetCore.Identity.FunctionalTests (2)
LoginTests.cs (2)
174await Assert.ThrowsAnyAsync<XunitException>(() => UserStories.LoginExistingUserAsync(newClient, userName, password)); 199await Assert.ThrowsAnyAsync<XunitException>(() => UserStories.LoginExistingUserAsync(newClient, userName, password));
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (3)
Rename\RenameEngineResult.vb (3)
241Catch ex As XunitException 257Catch ex As XunitException 293Catch ex As XunitException
ServerComparison.FunctionalTests (12)
HelloWorldTest.cs (1)
76catch (XunitException)
NtlmAuthenticationTest.cs (1)
99catch (XunitException)
ResponseCompressionTests.cs (3)
152catch (XunitException) 177catch (XunitException) 210catch (XunitException)
ResponseTests.cs (7)
114catch (XunitException) 143catch (XunitException) 163catch (XunitException) 188catch (XunitException) 213catch (XunitException) 238catch (XunitException) 258catch (XunitException)
Sockets.BindTests (1)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (1)
283catch (XunitException)
System.Windows.Forms.Design.Tests (1)
CodeDomHelpers.cs (1)
20catch (Xunit.Sdk.XunitException)
System.Windows.Forms.Primitives.TestUtilities (2)
Metafiles\Validators\EmfValidator.cs (1)
40catch (XunitException ex)
Metafiles\Validators\EmfValidator.WrappedXunitException.cs (1)
14public WrappedXunitException(string userMessage, XunitException innerException)
System.Windows.Forms.UI.IntegrationTests (1)
Infra\DataCollectionService.cs (1)
192if (e.Exception is not XunitException)
xunit.assert (2)
Sdk\Exceptions\XunitException.cs (2)
31 /// Initializes a new instance of the <see cref="XunitException"/> class. 44 /// Initializes a new instance of the <see cref="XunitException"/> class.