322 references to Fail
Aspire.Dashboard.Components.Tests (1)
Controls\StructuredLogDetailsTests.cs (1)
72Assert.Fail($"Duplicate properties with key '{duplicate.Key}'.");
Aspire.Hosting.SqlServer.Tests (1)
SqlServerFunctionalTests.cs (1)
232Assert.Fail("Waiting for database to be down");
Aspire.Hosting.Tests (5)
Dcp\ApplicationExecutorTests.cs (1)
451Assert.Fail("Pipe channel unexpectedly closed.");
Utils\StringComparersTests.cs (4)
58Assert.Fail($""" 81Assert.Fail($""" 101Assert.Fail("Unknown comparer: " + comparer); 125Assert.Fail("Unknown comparison: " + comparison);
Aspire.Oracle.EntityFrameworkCore.Tests (1)
ConformanceTests.cs (1)
95Assert.Fail($"Cannot connect to database: {ConnectionString}");
Aspire.Workload.Tests (3)
WorkloadTestsBase.cs (3)
185Assert.Fail($"Row with unknown name found: '{resourceName}'. Expected values: {string.Join(", ", expectedRowsTable.Keys.Select(k => $"'{k}'"))}"); 231Assert.Fail($"Unexpected endpoint found: {endpointFound} for resource named {resourceName}. Expected endpoints: {string.Join(',', expectedEndpoints)}"); 251Assert.Fail($"Expected rows not found: {string.Join(", ", expectedRowsTable.Keys.Except(foundNames))}");
Client.ClientBase.IntegrationTests (3)
MessageInspectorTests.4.4.0.cs (1)
101Assert.Fail(String.Format("One or both of the expected headers were not found.\nHeader: \"authType\" had value: {0}\nHeader: \"HttpRequestHeader.Authorization\" had value: {1}", authorizationHeaderValue, authTypeHeaderValue));
SessionTests.cs (2)
190Assert.Fail("channel.MethodCTerminating() should throw, but it didn't."); 202Assert.Fail($"channel.MethodCTerminating() threw unexpected exception: {e}");
Client.ExpectedExceptions.IntegrationTests (9)
ExpectedExceptionTests.4.0.0.cs (1)
276Assert.Fail("The Opening event timed out waiting for operations to queue, which was not expected for this test.");
ExpectedExceptionTests.4.1.0.cs (8)
119Assert.Fail(fullExceptionMessage); 354Assert.Fail("Expected: SecurityNegotiationException, Actual: no exception"); 363Assert.Fail(string.Format("Expected type SecurityNegotiationException, Actual: {0}", exceptionType)); 396Assert.Fail("Expected: SecurityNegotiationException, Actual: no exception"); 405Assert.Fail(string.Format("Expected type SecurityNegotiationException, Actual: {0}", exceptionType)); 443Assert.Fail("Expected: SecurityNegotiationException, Actual: no exception"); 452Assert.Fail(string.Format("Expected type SecurityNegotiationException, Actual: {0}", exceptionType)); 526Assert.Fail("The Opening event timed out waiting for operations to queue, which was not expected for this test.");
Contract.XmlSerializer.IntegrationTests (10)
XmlSerializerFormatTest.cs (10)
95Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 117Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 149Assert.Fail(ex.Message); 197Assert.Fail(ex.Message); 245Assert.Fail(ex.Message); 293Assert.Fail(ex.Message); 349Assert.Fail(ex.Message); 406Assert.Fail(ex.Message); 463Assert.Fail(ex.Message); 501Assert.Fail(ex.Message);
dotnet-svcutil.xmlserializer.IntegrationTests (10)
src\System.Private.ServiceModel\tests\Scenarios\Contract\XmlSerializer\XmlSerializerFormatTest.cs (10)
95Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 117Assert.Fail($"Test Failed, caught unexpected exception.\nException: {exception.ToString()}\nException Message: {exception.Message}"); 149Assert.Fail(ex.Message); 197Assert.Fail(ex.Message); 245Assert.Fail(ex.Message); 293Assert.Fail(ex.Message); 349Assert.Fail(ex.Message); 406Assert.Fail(ex.Message); 463Assert.Fail(ex.Message); 501Assert.Fail(ex.Message);
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (2)
128Assert.Fail(); 146Assert.Fail();
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
643Assert.Fail("Should not reach here");
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
643Assert.Fail("Should not reach here");
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
643Assert.Fail("Should not reach here");
IISExpress.FunctionalTests (3)
src\Servers\IIS\IIS\test\Common.FunctionalTests\AspNetCorePortTests.cs (2)
128Assert.Fail(); 146Assert.Fail();
src\Servers\IIS\IIS\test\Common.LongTests\ShutdownTests.cs (1)
643Assert.Fail("Should not reach here");
Infrastructure.IntegrationTests (1)
OSAndFrameworkTests.4.1.1.cs (1)
66Assert.Fail(string.Format("Detected the current Runtime Identifier as: '{0}'\n" +
InMemory.FunctionalTests (1)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
26Assert.Fail($"Tag collection contains {KestrelMetrics.ErrorTypeAttributeName} with value {error}.");
Interop.FunctionalTests (2)
Http3\Http3RequestTests.cs (2)
1057Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception); 1143Assert.Fail("Bad log write: " + badLogWrite + Environment.NewLine + badLogWrite.Exception);
InteropTests (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Microsoft.Analyzers.Extra.Tests (1)
Resources\RoslynTestUtils.cs (1)
149Assert.Fail($"Unexpected warning {actual}");
Microsoft.Analyzers.Local.Tests (1)
Resources\RoslynTestUtils.cs (1)
149Assert.Fail($"Unexpected warning {actual}");
Microsoft.Arcade.Test.Common (4)
AssertEx.cs (4)
206Assert.Fail(assertMessage); 309Assert.Fail(message); 314Assert.Fail(string.Format(format, args)); 337Assert.Fail(GetAssertMessage(expected, actual, escapeQuotes, expectedValueSourcePath, expectedValueSourceLine));
Microsoft.AspNetCore.App.Analyzers.Test (4)
Http\HeaderDictionaryIndexerAnalyzerTests.cs (1)
190Assert.Fail($"A mapping for property '{propertyName}' on IHeaderDictionary must be added to {nameof(HeaderDictionaryIndexerAnalyzer)}.{nameof(HeaderDictionaryIndexerAnalyzer.PropertyMapping)}.");
Infrastructure\AmbiguousRoutePatternComparerTests.cs (2)
93Assert.Fail("Failed to convert text to token."); 99Assert.Fail("Failed to parse virtual chars to route pattern.");
RouteEmbeddedLanguage\RoutePatternParserTests.cs (1)
198Assert.Fail($"Parsing '{token.ValueText}' didn't throw an error for expected diagnostics: \r\n" + expectedDiagnostics.ToString().Replace(@"""", @""""""));
Microsoft.AspNetCore.App.UnitTests (1)
TargetingPackTests.cs (1)
186Assert.Fail($"{packageName} is not a recognized aspNetCore or runtime dependency");
Microsoft.AspNetCore.Authentication.Test (5)
JwtBearerTests.cs (1)
204Assert.Fail("Expected exception is not thrown");
JwtBearerTests_Handler.cs (1)
191Assert.Fail("Expected exception is not thrown");
OpenIdConnect\TestSettings.cs (3)
81Assert.Fail(buf.ToString()); 119Assert.Fail(buf.ToString()); 158Assert.Fail(buf.ToString());
Microsoft.AspNetCore.Components.Analyzers.Tests (9)
Verifiers\CodeFixVerifier.cs (1)
112Assert.Fail(
Verifiers\DiagnosticVerifier.cs (8)
115Assert.Fail( 128Assert.Fail( 140Assert.Fail( 156Assert.Fail( 165Assert.Fail( 174Assert.Fail( 207Assert.Fail( 220Assert.Fail(
Microsoft.AspNetCore.Components.Endpoints.Tests (3)
RazorComponentResultTest.cs (1)
495Assert.Fail("Timeout elapsed without content being written");
RazorComponentsServiceCollectionExtensionsTest.cs (2)
131Assert.Fail($"Could not find an implementation type for {serviceType}"); 135Assert.Fail($"Found duplicate implementation types for {serviceType}. Implementation types: {string.Join(", ", implementationTypes.Select(x => x.ToString()))}");
Microsoft.AspNetCore.Components.SdkAnalyzers.Tests (9)
Verifiers\CodeFixVerifier.cs (1)
112Assert.Fail(
Verifiers\DiagnosticVerifier.cs (8)
115Assert.Fail( 128Assert.Fail( 140Assert.Fail( 156Assert.Fail( 165Assert.Fail( 174Assert.Fail( 207Assert.Fail( 220Assert.Fail(
Microsoft.AspNetCore.Components.Tests (2)
Routing\RouterTest.cs (2)
114Assert.Fail("OnUpdateDisplay called more than once."); 167Assert.Fail("OnUpdateDisplay called more than once.");
Microsoft.AspNetCore.Cryptography.Internal.Tests (1)
Cng\BCryptUtilTests.cs (1)
58Assert.Fail("Buffer was not filled as expected.");
Microsoft.AspNetCore.DataProtection.Tests (4)
Repositories\EphemeralXmlRepositoryTests.cs (1)
71Assert.Fail("Unexpected element name: " + element.Element.Name.LocalName);
Repositories\FileSystemXmlRepositoryTests.cs (1)
176Assert.Fail("Unexpected element name: " + element.Element.Name.LocalName);
Repositories\RegistryXmlRepositoryTests.cs (1)
164Assert.Fail("Unexpected element name: " + element.Element.Name.LocalName);
XmlAssert.cs (1)
36Assert.Fail(
Microsoft.AspNetCore.FunctionalTests (1)
WebHostFunctionalTests.cs (1)
129Assert.Fail("Information log when log level set to warning in config");
Microsoft.AspNetCore.Http.Connections.Tests (2)
HttpConnectionDispatcherTests.cs (2)
1507Assert.Fail("Poll took too long to start"); 1527Assert.Fail("Poll took too long to start");
Microsoft.AspNetCore.Http.Extensions.Tests (1)
RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
370Assert.Fail("RegenerateBaselines=true. Do not merge PRs with this set.");
Microsoft.AspNetCore.Http.Microbenchmarks (1)
src\Http\Http.Extensions\test\RequestDelegateGenerator\RequestDelegateCreationTestBase.cs (1)
370Assert.Fail("RegenerateBaselines=true. Do not merge PRs with this set.");
Microsoft.AspNetCore.Http.Tests (1)
CookieOptionsTests.cs (1)
52Assert.Fail("Not implemented: " + property.Name);
Microsoft.AspNetCore.Identity.EntityFrameworkCore.Test (1)
UserStoreEncryptPersonalDataTest.cs (1)
136Assert.Fail("Didn't find user");
Microsoft.AspNetCore.Identity.Specification.Tests (1)
IdentityResultAssert.cs (1)
72Assert.Fail("No logger registered");
Microsoft.AspNetCore.InternalTesting.Tests (4)
ConditionalFactTest.cs (1)
29Assert.Fail("This test should always be skipped.");
ConditionalTheoryTest.cs (3)
25Assert.Fail("This test should always be skipped."); 51Assert.Fail("This should never run"); 75Assert.Fail("This should never run");
Microsoft.AspNetCore.Mvc.Core.Test (9)
DependencyInjection\MvcCoreServiceCollectionExtensionsTest.cs (2)
365Assert.Fail($"Could not find an instance of {implementationType} registered as {serviceType}"); 369Assert.Fail($"Found multiple instances of {implementationType} registered as {serviceType}");
Filters\MiddlewareFilterTest.cs (1)
382Assert.Fail("ReleaseController should have been called.");
ModelBinding\Binders\ComplexObjectModelBinderProviderTest.cs (2)
43Assert.Fail("Not the right model type"); 70Assert.Fail("Not the right model type");
ModelBinding\Binders\ComplexTypeModelBinderProviderTest.cs (2)
43Assert.Fail("Not the right model type"); 70Assert.Fail("Not the right model type");
ModelBinding\Binders\DictionaryModelBinderProviderTest.cs (1)
48Assert.Fail("Not the right model type");
ModelBinding\Binders\KeyValuePairModelBinderProviderTest.cs (1)
44Assert.Fail("Not the right model type");
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
Infrastructure\ResourceFile.cs (2)
78Assert.Fail($"Manifest resource: { fullName } not found."); 84Assert.Fail($"Manifest resource '{ fullName }' not found.");
Microsoft.AspNetCore.Mvc.Localization.Test (2)
MvcLocalizationServiceCollectionExtensionsTest.cs (2)
64Assert.Fail($"Could not find an instance of {implementationType} registered as {serviceType}"); 68Assert.Fail($"Found multiple instances of {implementationType} registered as {serviceType}");
Microsoft.AspNetCore.Mvc.Test (2)
MvcServiceCollectionExtensionsTest.cs (2)
642Assert.Fail($"Could not find an instance of {implementationType} registered as {serviceType}"); 665Assert.Fail($"Found multiple instances of {implementationType} registered as {serviceType}");
Microsoft.AspNetCore.OutputCaching.Tests (1)
OutputCacheTests.cs (1)
1020Assert.Fail($"Unexpected length: {len.Value}");
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
RequestTests.cs (1)
370Assert.Fail("Request should not reach here");
Microsoft.AspNetCore.Server.IntegrationTesting (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (4)
HeartbeatTests.cs (2)
90Assert.Fail($"{roundedActualMs} is smaller than wait time of {intervalMs}."); 95Assert.Fail($"{roundedActualMs} is much larger than wait time of {intervalMs}.");
HttpRequestHeadersTests.cs (1)
885Assert.Fail();
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
26Assert.Fail($"Tag collection contains {KestrelMetrics.ErrorTypeAttributeName} with value {error}.");
Microsoft.AspNetCore.Server.Kestrel.Tests (4)
KestrelConfigurationLoaderTests.cs (4)
1795serverOptions.ConfigurationLoader.LocalhostEndpoint(7000, _ => Assert.Fail("New endpoints should not be added after ProcessEndpointsToAdd")); 1818serverOptions.ConfigurationLoader.LocalhostEndpoint(7000, _ => Assert.Fail("New endpoints should not be added after Load")); 1830serverOptions.ConfigurationLoader.LocalhostEndpoint(7000, _ => Assert.Fail("New endpoints should not be added by LoadInternal")); 1843serverOptions.ConfigurationLoader.LocalhostEndpoint(7000, _ => Assert.Fail("New endpoints should not be added by Reload"));
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (3)
HubConnectionTests.cs (2)
580Assert.Fail("Expected an exception from the streaming invocation."); 661Assert.Fail("Expected an exception from the streaming invocation.");
HubConnectionTests.Tracing.cs (1)
509Assert.Fail("Expected an exception from the streaming invocation.");
Microsoft.AspNetCore.SignalR.Common.Tests (1)
Internal\Protocol\JsonHubProtocolTests.cs (1)
289Assert.Fail("Passed in unexpected object(s)");
Microsoft.AspNetCore.SignalR.Tests (4)
EndToEndTests.cs (2)
518Assert.Fail("Expected error was not thrown."); 532Assert.Fail("Expected error was not thrown.");
HubConnectionHandlerTests.cs (2)
2775Assert.Fail("Received message after close"); 2787Assert.Fail("Unexpected message type: " + message.GetType().Name);
Microsoft.AspNetCore.SignalR.Tests.Utils (1)
src\Shared\SignalR\VerifyNoErrorScope.cs (1)
64Assert.Fail(errorMessage);
Microsoft.AspNetCore.WebSockets.Tests (1)
SendReceiveTests.cs (1)
97Assert.Fail("Expected an exception to be thrown!");
Microsoft.Build.BuildCheck.UnitTests (1)
EditorConfig_Tests.cs (1)
719Assert.Fail(message);
Microsoft.Build.Engine.OM.UnitTests (12)
Construction\ProjectUsingTaskElement_Tests.cs (5)
359Assert.Fail(); 379Assert.Fail(); 398Assert.Fail(); 447Assert.Fail(); 468Assert.Fail();
Construction\SolutionFile_Tests.cs (1)
61Assert.Fail("Should not get here");
Construction\UsingTaskBodyElement_Tests.cs (2)
49Assert.Fail(); 109Assert.Fail();
Construction\UsingTaskParameterElement_Tests.cs (1)
93Assert.Fail();
Construction\UsingTaskParameterGroup_Tests.cs (2)
110Assert.Fail(); 130Assert.Fail();
Definition\ProjectCollection_Tests.cs (1)
727Assert.Fail("An InvalidProjectFileException was expected.");
Microsoft.Build.Engine.UnitTests (47)
BackEnd\BuildRequestEngine_Tests.cs (3)
215Assert.Fail("Builder thread did not terminate on cancel."); 538Assert.Fail("Did not receive " + eventName + " callback before the timeout expired."); 542Assert.Fail("Received engine exception " + _engineException_Exception);
BackEnd\LoggingService_Tests.cs (2)
1126Assert.Fail("No Exceptions Generated"); 1132Assert.Fail("Expected a " + expectedExceptionType + " but got a " + e.GetType() + " Stack:" + e.ToString());
BackEnd\NodeEndpointInProc_Tests.cs (2)
335Assert.Fail("Data not received before timeout expired."); 345Assert.Fail("Data not received before timeout expired.");
BackEnd\RequestBuilder_Tests.cs (1)
330Assert.Fail("Did not receive " + eventName + " callback before the timeout expired.");
BackEnd\TaskHostConfiguration_Tests.cs (4)
742Assert.Fail("The two item lists are not equal -- one of them is null"); 747Assert.Fail("The two item lists have different lengths, so they cannot be equal"); 768Assert.Fail("The two items are not equal -- one of them is null"); 782Assert.Fail(string.Format("Only one item contains the '{0}' metadata", metadataName));
BackEnd\TaskRegistry_Tests.cs (8)
1383Assert.Fail(); 1426Assert.Fail(); 1472Assert.Fail(); 1490Assert.Fail(); 1561Assert.Fail(); 1608Assert.Fail(); 1655Assert.Fail(); 1812Assert.Fail();
Collections\MultiDictionary_Tests.cs (1)
33Assert.Fail();
Construction\SolutionProjectGenerator_Tests.cs (3)
1301Assert.Fail("Unexpected project seen:" + item.ItemSpec); 1975Assert.Fail("Something went really wrong! The SolutionFile wasn't even created!"); 2862Assert.Fail();
Definition\Toolset_Tests.cs (1)
148Assert.Fail($"Sub-toolset {key} was lost in translation.");
ErrorUtilities_Tests.cs (1)
29Assert.Fail("Should have thrown an exception");
Evaluation\Evaluator_Tests.cs (7)
1940Assert.Fail(String.Format("project.Properties contained property {0}, but AllEvaluatedProperties did not.", property.Name)); 1944Assert.Fail(String.Format("The properties in project.Properties and AllEvaluatedProperties for property {0} were different.", property.Name)); 2104Assert.Fail(String.Format("project.Properties contained property {0}, but AllEvaluatedProperties did not.", property.Name)); 2108Assert.Fail(String.Format("The properties in project.Properties and AllEvaluatedProperties for property {0} were different.", property.Name)); 3145Assert.Fail(); 4388Assert.Fail(); 4478Assert.Fail("Expect exception due to the value of property \"TargetOSFamily\" is not a number.");
Evaluation\Expander_Tests.cs (4)
1266Assert.Fail(); 1293Assert.Fail(); 3638Assert.Fail(); 4305Assert.Fail(message);
FileLogger_Tests.cs (1)
540Assert.Fail();
FileMatcher_Tests.cs (8)
652Assert.Fail("Unexpected input into GetFileSystemEntries"); 2119Assert.Fail(String.Format("Unhandled case in GetMatchingFiles: {0}", pattern)); 2176Assert.Fail(String.Format("Unhandled case in GetMatchingDirectories: {0}", pattern)); 2499Assert.Fail("FileMatcher Regression: Failure while validating SplitFileSpec."); 2527Assert.Fail("FileMatcher Regression: Failure while validating that files match."); 2552Assert.Fail("FileMatcher Regression: Failure while validating that files don't match."); 2580Assert.Fail("FileMatcher Regression: Expected an illegal filespec, but got a legal one."); 2605Assert.Fail("FileMatcher Regression: Invalid filespec.");
InvalidProjectFileException_Tests.cs (1)
75Assert.Fail("Loading an invalid project should have thrown an InvalidProjectFileException.");
Microsoft.Build.Tasks.UnitTests (20)
AssemblyDependency\ResolveAssemblyReferenceTestFixture.cs (6)
328Assert.Fail(message); 349Assert.Fail(message); 361Assert.Fail(message); 647Assert.Fail("Unsupported GetFiles pattern " + pattern); 2772Assert.Fail($"New GetRegistrySubKeyNames parameters encountered, need to add unittesting support for subKey={subKey}"); 2911Assert.Fail($"New GetRegistrySubKeyDefaultValue parameters encountered, need to add unittesting support for subKey={subKey}");
CommandLineBuilderExtension_Tests.cs (1)
50Assert.Fail("Got an unexpected exception:" + e.Message);
CreateCSharpManifestResourceName_Tests.cs (1)
783Assert.Fail(String.Format("Encountered a new path {0}, needs unittesting support", path));
ErrorUtilities_Tests.cs (1)
29Assert.Fail("Should have thrown an exception");
NativeMethodsShared_Tests.cs (1)
48Assert.Fail();
Touch_Tests.cs (6)
68Assert.Fail("Unexpected file exists: " + path); 90Assert.Fail("Unexpected file create: " + path); 117Assert.Fail("Unexpected file attributes: " + path); 131Assert.Fail("Unexpected set file attributes: " + path); 156Assert.Fail("Unexpected set last access time: " + path); 181Assert.Fail("Unexpected set last write time: " + path);
XslTransformation_Tests.cs (4)
129Assert.Fail("Test error"); 145Assert.Fail("Test error"); 190Assert.Fail("Test error"); 239Assert.Fail("Test error");
Microsoft.Build.UnitTests.Shared (8)
MockLogger.cs (1)
541Assert.Fail($"Log was not expected to contain '{contains}', but did.");
ObjectModelHelpers.cs (7)
446Assert.Fail(string.Format("Item '{0}' was expected but not returned.", expectedItem.ItemSpec)); 454Assert.Fail("Items were returned in the incorrect order. See 'Standard Out' tab for more details."); 1156Assert.Fail("unrecognized current platform"); 1904Assert.Fail("Neither threw"); 1962Assert.Fail(output); 1970Assert.Fail("Expected content was shorter, actual had this extra line: '" + actualLines[expectedLines.Length] + "'"); 1977Assert.Fail("Actual content was shorter, expected had this extra line: '" + expectedLines[actualLines.Length] + "'");
Microsoft.Build.Utilities.UnitTests (2)
ErrorUtilities_Tests.cs (1)
29Assert.Fail("Should have thrown an exception");
NativeMethodsShared_Tests.cs (1)
48Assert.Fail();
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueTestVerifier.cs (1)
420Assert.Fail($"""
Microsoft.Data.Analysis.Tests (1)
test\Microsoft.ML.TestFramework\GlobalBase.cs (1)
82Assert.Fail($"Assert failed: {msg}");
Microsoft.DotNet.NuGetRepack.Tests (4)
TestHelpers\AssertEx.cs (4)
164Assert.Fail(GetAssertMessage(expected, actual, escapeQuotes, expectedValueSourcePath, expectedValueSourceLine)); 222Assert.Fail(assertMessage); 325Assert.Fail(message); 330Assert.Fail(string.Format(format, args));
Microsoft.DotNet.XUnitAssert.Tests (2)
FailAssertsTests.cs (2)
9 var ex = Record.Exception(() => Assert.Fail()); 18 var ex = Record.Exception(() => Assert.Fail("This is a user message"));
Microsoft.Extensions.ApiDescription.Client.Tests (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Microsoft.Extensions.Diagnostics.Probes.Tests (2)
KubernetesProbesOptionsValidatorTests.cs (2)
88Assert.Fail("Unexpected OptionsValidationException: " + ex.Message); 92Assert.Fail("Unexpected exception: " + ex.Message);
Microsoft.Extensions.Localization.Tests (2)
LocalizationServiceCollectionExtensionsTest.cs (2)
55Assert.Fail($"Could not find an instance of {implementationType} registered as {serviceType}"); 59Assert.Fail($"Found multiple instances of {implementationType} registered as {serviceType}");
Microsoft.Gen.ComplianceReports.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
147Assert.Fail($"Unexpected diagnostics {actual}"); 162Assert.Fail($"No span detected for diagnostic #{spanNum}, {d}"); 180Assert.Fail($"Diagnostic {spanNum} was not detected");
Microsoft.Gen.ContextualOptions.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
147Assert.Fail($"Unexpected diagnostics {actual}"); 162Assert.Fail($"No span detected for diagnostic #{spanNum}, {d}"); 180Assert.Fail($"Diagnostic {spanNum} was not detected");
Microsoft.Gen.Logging.Unit.Tests (4)
ParserTests.cs (1)
750Assert.Fail($"Expected no diagnostics, got {d.Count} diagnostics");
test\Generators\Shared\RoslynTestUtils.cs (3)
147Assert.Fail($"Unexpected diagnostics {actual}"); 162Assert.Fail($"No span detected for diagnostic #{spanNum}, {d}"); 180Assert.Fail($"Diagnostic {spanNum} was not detected");
Microsoft.Gen.Metrics.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
147Assert.Fail($"Unexpected diagnostics {actual}"); 162Assert.Fail($"No span detected for diagnostic #{spanNum}, {d}"); 180Assert.Fail($"Diagnostic {spanNum} was not detected");
Microsoft.Gen.MetricsReports.Unit.Tests (3)
test\Generators\Shared\RoslynTestUtils.cs (3)
147Assert.Fail($"Unexpected diagnostics {actual}"); 162Assert.Fail($"No span detected for diagnostic #{spanNum}, {d}"); 180Assert.Fail($"Diagnostic {spanNum} was not detected");
Microsoft.ML.Core.Tests (10)
UnitTests\ColumnTypes.cs (10)
35Assert.Fail(dict[tmp] + " and " + tmp.ToString() + " are duplicates."); 41Assert.Fail(dict[tmp1] + " and " + tmp1.ToString() + " are duplicates."); 47Assert.Fail(dict[tmp2] + " and " + tmp2.ToString() + " are duplicates."); 62Assert.Fail(dict[tmp] + " and " + tmp.ToString() + " are duplicates."); 68Assert.Fail(dict[tmp1] + " and " + tmp1.ToString() + " are duplicates."); 74Assert.Fail(dict[tmp2] + " and " + tmp2.ToString() + " are duplicates."); 82Assert.Fail(dict[tmp] + " and " + tmp.ToString() + " are duplicates."); 88Assert.Fail(dict[tmp1] + " and " + tmp1.ToString() + " are duplicates."); 94Assert.Fail(dict[tmp2] + " and " + tmp2.ToString() + " are duplicates."); 107Assert.Fail(dict[tmp4] + " and " + tmp4.ToString() + " are duplicates.");
Microsoft.ML.Sweeper.Tests (8)
TestSweeper.cs (8)
123Assert.Fail("Wrong parameter"); 422Assert.Fail("Wrong parameter"); 469Assert.Fail("Wrong parameter"); 496Assert.Fail("Wrong parameter"); 528Assert.Fail("Wrong parameter"); 582Assert.Fail("Wrong parameter"); 630Assert.Fail("Wrong parameter"); 681Assert.Fail("Wrong parameter");
Microsoft.ML.TestFramework (2)
DataPipe\TestDataPipe.cs (1)
1614Assert.Fail("The LDA transform does not throw expected error on empty documents.");
GlobalBase.cs (1)
82Assert.Fail($"Assert failed: {msg}");
Microsoft.ML.Tests (4)
Scenarios\Api\TestApi.cs (2)
94Assert.Fail("Throw an error if attribute is applied to a field that is not an IChannel."); 117Assert.Fail("Throw an error if attribute is applied to a field that is not an IChannel.");
TextLoaderTests.cs (2)
112Assert.Fail("Test failed."); 136Assert.Fail("Test failed.");
PresentationCore.Tests (1)
BinaryFormat\DataObjectTests.cs (1)
37Assert.Fail("ClipboardDataObject is null.");
Sockets.BindTests (2)
src\Servers\Kestrel\test\BindTests\AddressRegistrationTests.cs (2)
997Assert.Fail($"The corresponding {otherAddressFamily} address was already in use 10 times."); 1002Assert.Fail($"An error for a conflict with {otherAddressFamily} was thrown 10 times.");
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\MetricsAssert.cs (1)
26Assert.Fail($"Tag collection contains {KestrelMetrics.ErrorTypeAttributeName} with value {error}.");
src\Servers\Kestrel\test\FunctionalTests\MaxRequestBufferSizeTests.cs (1)
416Assert.Fail("Stream completed without expected substring.");
src\Servers\Kestrel\test\FunctionalTests\RequestTests.cs (1)
1153Assert.Fail("Stream completed without expected substring.");
System.Drawing.Common.Tests (4)
DrawingTest.cs (1)
23Assert.Fail("Could not compute hash.");
mono\System.Drawing\GraphicsTests.cs (1)
81Assert.Fail($"Position {x},{y}");
mono\System.Imaging\MetafileTest.cs (1)
208Assert.Fail($"Unknown EmfType '{type}'");
System\Drawing\IconTests.cs (1)
777Assert.Fail($"Unexpected bitmap depth: {expectedBitDepth}");
System.ServiceModel.Primitives.Tests (1)
Channels\CustomBindingTest.cs (1)
35Assert.Fail(String.Format("Unexpected exception was caught: {0}", ex.ToString()));
System.Windows.Forms.Interop.Tests (2)
PropertyGridTests.cs (2)
29Assert.Fail("Invalid set values should produce ExternalException which will be presented to the user."); 63Assert.Fail("Invalid set values should produce ExternalException which will be presenttted to the user.");
System.Windows.Forms.Primitives.Tests (2)
System\SpanReaderTests.cs (2)
62Assert.Fail($"Expected {nameof(ArgumentOutOfRangeException)}"); 85Assert.Fail($"Expected {nameof(ArgumentOutOfRangeException)}");
System.Windows.Forms.UI.IntegrationTests (1)
Infra\ControlTestBase.cs (1)
138Assert.Fail($"The key with virtual key code '{code}' was unexpectedly pressed at the {(isStartOfTest ? "start" : "end")} of the test.");
Templates.Blazor.Tests (3)
BlazorTemplateTest.cs (1)
212Assert.Fail($"The counter did not increment after {MaxIncrementAttempts} attempts");
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Templates.Blazor.WebAssembly.Auth.Tests (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Templates.Blazor.WebAssembly.Tests (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Templates.Mvc.Tests (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
Templates.Tests (2)
src\Shared\Process\ProcessEx.cs (2)
199Assert.Fail($"Process {_process.ProcessName} with pid: {_process.Id} has not finished running."); 224Assert.Fail($"Process exited with code {_process.ExitCode}\nStdErr: {Error}\nStdOut: {Output}");
xunit.assert (1)
Sdk\Exceptions\FailException.cs (1)
28 /// the user calls <see cref="Assert.Fail"/>.