45 references to Single
IIS.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
145Assert.Single(contentTypes, "text/event-stream");
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (1)
235Assert.Single(Directory.GetFiles(LogFolderPath), Helpers.GetExpectedLogName(deploymentResult, LogFolderPath));
IISExpress.FunctionalTests (2)
src\Servers\IIS\IIS\test\Common.FunctionalTests\CompressionTests.cs (1)
145Assert.Single(contentTypes, "text/event-stream");
src\Servers\IIS\IIS\test\Common.FunctionalTests\LoggingTests.cs (1)
235Assert.Single(Directory.GetFiles(LogFolderPath), Helpers.GetExpectedLogName(deploymentResult, LogFolderPath));
Microsoft.AspNetCore.Components.Web.Tests (1)
Forms\InputBaseTest.cs (1)
152Assert.Single(valueChangedCallLog, "new value");
Microsoft.AspNetCore.Http.Results.Tests (12)
AcceptedAtRouteOfTResultTests.cs (1)
136Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
AcceptedOfTResultTests.cs (1)
77Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
BadRequestOfTResultTests.cs (1)
120Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
ConflictOfTResultTests.cs (1)
98Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
CreatedAtRouteOfTResultTests.cs (1)
106Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
CreatedOfTResultTests.cs (1)
112Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
InternalServerErrorOfTResultTests.cs (1)
120Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
NotFoundOfTResultTests.cs (1)
80Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
OkOfTResultTests.cs (1)
97Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
ResultsTests.cs (1)
1715Assert.All(actualMethods, name => Assert.Single(testedMethods, name));
UnprocessableEntityOfTResultTests.cs (1)
97Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/json");
ValidationProblemResultTests.cs (1)
108Assert.Single(producesResponseTypeMetadata.ContentTypes, "application/problem+json");
Microsoft.AspNetCore.Mvc.FunctionalTests (2)
RoutingTestsBase.cs (2)
364Assert.Single(result.ExpectedUrls, expected); 973Assert.Single(result.ExpectedUrls, expected);
Microsoft.AspNetCore.Mvc.RazorPages.Test (1)
Infrastructure\PageActionDescriptorProviderTest.cs (1)
232Assert.Single(descriptor.EndpointMetadata, expected);
Microsoft.AspNetCore.ResponseCompression.Tests (6)
ResponseCompressionMiddlewareTest.cs (6)
756Assert.Single(response.Content.Headers.ContentEncoding, encoding); 809Assert.Single(response.Content.Headers.ContentEncoding, encoding); 878Assert.Single(response.Content.Headers.ContentEncoding, encoding); 942Assert.Single(response.Content.Headers.ContentEncoding, encoding); 1218Assert.Single(response.Content.Headers.ContentEncoding, encoding); 1302Assert.Single(response.Content.Headers.ContentEncoding, expectedEncoding);
Microsoft.AspNetCore.Server.Kestrel.Tests (1)
HttpsConfigurationTests.cs (1)
42Assert.Single(host.ServerFeatures.Get<IServerAddressesFeature>().Addresses, address);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
WebHostTests.cs (2)
257Assert.Single(altSvcValues1, @$"h3="":{host.GetPort()}"""); 271Assert.Single(altSvcValues2, @$"h3="":{host.GetPort()}""");
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (1)
SourceGeneration\GeneratorDriverTests.cs (1)
3255Assert.Single(referenceList, modifiedRef.Display);
Microsoft.CodeAnalysis.Workspaces.UnitTests (2)
UtilityTest\BKTreeTests.cs (2)
29Assert.Single(results1, "what"); 52Assert.Single(Find(tree, value, threshold: 0), value.ToLower());
Microsoft.DotNet.XUnitAssert.Tests (6)
CollectionAssertsTests.cs (6)
2341 Assert.Throws<ArgumentNullException>("collection", () => Assert.Single(null!, null)); 2349 Assert.Single(collection, "Hello"); 2357 Assert.Single(collection, null); 2365 var ex = Record.Exception(() => Assert.Single(collection, "foo")); 2381 var ex = Record.Exception(() => Assert.Single(collection, "Hello")); 2398 var ex = Record.Exception(() => Assert.Single(collection, 4));
Microsoft.Gen.ContextualOptions.Generated.Tests (3)
ContextualOptionsTests.cs (3)
28Assert.Single(receiver.Received, ("Foo", (object?)"FooValue")); 46Assert.Single(receiver.Received, ("Foo", (object?)"PropertyValue")); 54Assert.Single(receiver.Received, ("Foo", (object?)"FooValue"));
Microsoft.Gen.ContextualOptions.Unit.Tests (4)
ContextualOptionsTests.cs (3)
28Assert.Single(receiver.Received, ("Foo", (object?)"FooValue")); 46Assert.Single(receiver.Received, ("Foo", (object?)"PropertyValue")); 54Assert.Single(receiver.Received, ("Foo", (object?)"FooValue"));
EmitterTests.cs (1)
99Assert.Single(statements, "receiver.Receive(nameof(Foo), Foo);");