Implemented interface member:
property
Writes
Microsoft.Extensions.Logging.Testing.ITestSink.Writes
266 references to Writes
Microsoft.AspNetCore.Antiforgery.Test (7)
DefaultAntiforgeryTest.cs (7)
383var hasWarningMessage = testSink.Writes 401var hasWarningMessage = testSink.Writes 419var hasWarningMessage = testSink.Writes 437var hasWarningMessage = testSink.Writes 1299var hasWarningMessage = testSink.Writes 1338var hasWarningMessage = testSink.Writes 1372var hasWarningMessage = testSink.Writes
Microsoft.AspNetCore.Components.Tests (2)
Lifetime\ComponentStatePersistenceManagerTest.cs (2)
204var log = Assert.Single(sink.Writes); 233var log = Assert.Single(sink.Writes);
Microsoft.AspNetCore.Diagnostics.Tests (1)
ExceptionHandlerTest.cs (1)
653Assert.DoesNotContain(sink.Writes, w =>
Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests (3)
JsonTranscodingServiceMethodProviderTests.cs (3)
117var write = testSink.Writes.Single(w => 151Assert.Contains(testSink.Writes, c => c.Message == "Unable to bind GetClientStreaming on transcoding.JsonTranscodingStreaming to gRPC JSON transcoding. Client and bidirectional streaming methods are not supported."); 152Assert.Contains(testSink.Writes, c => c.Message == "Unable to bind GetBidiStreaming on transcoding.JsonTranscodingStreaming to gRPC JSON transcoding. Client and bidirectional streaming methods are not supported.");
Microsoft.AspNetCore.Hosting.Tests (5)
HostingApplicationDiagnosticsTests.cs (3)
1070var startLog = testSink.Writes.Single(w => w.EventId == LoggerEventIds.RequestStarting); 1071var unhandedLog = testSink.Writes.Single(w => w.EventId == LoggerEventIds.RequestUnhandled); 1072var endLog = testSink.Writes.Single(w => w.EventId == LoggerEventIds.RequestFinished);
WebHostBuilderTests.cs (2)
313var context = provider.Sink.Writes.Where(s => s.EventId.Id == LoggerEventIds.HostingStartupAssemblyException); 1209var context = provider.Sink.Writes.FirstOrDefault(s => s.EventId.Id == LoggerEventIds.HostingStartupAssemblyException);
Microsoft.AspNetCore.Http.Tests (1)
ResponseCookiesTest.cs (1)
53var writeContext = Assert.Single(sink.Writes);
Microsoft.AspNetCore.HttpLogging.Tests (4)
FileLoggerProcessorTests.cs (4)
236Assert.Empty(testSink.Writes); 239await WaitForCondition(() => testSink.Writes.FirstOrDefault()?.EventId.Name == "MaxFilesReached").DefaultTimeout(); 251Assert.Empty(testSink2.Writes); 255await WaitForCondition(() => testSink2.Writes.FirstOrDefault()?.EventId.Name == "MaxFilesReached").DefaultTimeout();
Microsoft.AspNetCore.HttpsPolicy.Tests (12)
HstsMiddlewareTests.cs (5)
210var logMessages = sink.Writes.ToList(); 265var logMessages = sink.Writes.ToList(); 320var logMessages = sink.Writes.ToList(); 367var logMessages = sink.Writes.ToList(); 413var logMessages = sink.Writes.ToList();
HttpsRedirectionMiddlewareTests.cs (7)
57var logMessages = sink.Writes.ToList(); 113var logMessages = sink.Writes.ToList(); 169var logMessages = sink.Writes.ToList(); 270var logMessages = sink.Writes.ToList(); 358var logMessages = sink.Writes.ToList(); 404var logMessages = sink.Writes.ToList(); 448var logMessages = sink.Writes.ToList();
Microsoft.AspNetCore.Localization.Tests (2)
CookieRequestCultureProviderTest.cs (2)
223var write = Assert.Single(sink.Writes); 282var write = Assert.Single(sink.Writes);
Microsoft.AspNetCore.Mvc.Core.Test (33)
Filters\DisableRequestSizeLimitFilterTest.cs (3)
67var write = Assert.Single(sink.Writes); 90var write = Assert.Single(sink.Writes); 111var write = Assert.Single(sink.Writes);
Filters\RequestFormLimitsFilterTest.cs (3)
72var write = Assert.Single(sink.Writes); 97var write = Assert.Single(sink.Writes); 123var write = Assert.Single(sink.Writes);
Filters\RequestSizeLimitFilterTest.cs (3)
71var write = Assert.Single(sink.Writes); 95var write = Assert.Single(sink.Writes); 117var write = Assert.Single(sink.Writes);
Infrastructure\ActionSelectorTest.cs (1)
515var write = Assert.Single(sink.Writes);
Infrastructure\ControllerActionInvokerTest.cs (1)
1574var messages = testSink.Writes.Select(write => write.State.ToString()).ToList();
Infrastructure\JsonResultExecutorTestBase.cs (2)
246var write = Assert.Single(sink.Writes); 264var write = Assert.Single(sink.Writes);
ModelBinding\Binders\BodyModelBinderTests.cs (2)
610var writeList = sink.Writes.ToList(); 642sink.Writes,
ModelBinding\Binders\SimpleTypeModelBinderTest.cs (2)
193Assert.Equal(3, sink.Writes.Count()); 283Assert.Equal(2, sink.Writes.Count());
ModelBinding\Binders\TryParseTypeModelBinderTest.cs (2)
142Assert.Equal(3, sink.Writes.Count()); 210Assert.Equal(2, sink.Writes.Count());
ModelBinding\ParameterBinderTest.cs (1)
221Assert.Equal(4, sink.Writes.Count());
MvcCoreLoggerExtensionsTest.cs (12)
59var write = Assert.Single(testSink.Writes); 89var write = Assert.Single(testSink.Writes); 118var write = Assert.Single(testSink.Writes); 163Assert.Empty(testSink.Writes); 205var write = Assert.Single(testSink.Writes); 251var write = Assert.Single(testSink.Writes); 297var write = Assert.Single(testSink.Writes); 343var write = Assert.Single(testSink.Writes); 389var write = Assert.Single(testSink.Writes); 419var write = Assert.Single(testSink.Writes); 448var write = Assert.Single(testSink.Writes); 476var write = Assert.Single(testSink.Writes);
Routing\MvcRouteHandlerTests.cs (1)
45var write = Assert.Single(sink.Writes);
Microsoft.AspNetCore.Mvc.Formatters.Xml.Test (2)
XmlDataContractSerializerOutputFormatterTest.cs (1)
665var write = Assert.Single(sink.Writes);
XmlSerializerOutputFormatterTest.cs (1)
482var write = Assert.Single(sink.Writes);
Microsoft.AspNetCore.Mvc.NewtonsoftJson.Test (2)
src\Mvc\Mvc.Core\test\Infrastructure\JsonResultExecutorTestBase.cs (2)
246var write = Assert.Single(sink.Writes); 264var write = Assert.Single(sink.Writes);
Microsoft.AspNetCore.Mvc.Razor.Test (2)
TagHelpers\TagHelperComponentTagHelperTest.cs (2)
247Assert.Equal($"Tag helper component '{typeof(TestTagHelperComponent)}' initialized.", sink.Writes.First().State.ToString(), StringComparer.Ordinal); 280Assert.Equal($"Tag helper component '{typeof(TestTagHelperComponent)}' processed.", sink.Writes.First().State.ToString(), StringComparer.Ordinal);
Microsoft.AspNetCore.Mvc.RazorPages.Test (8)
Infrastructure\PageActionInvokerTest.cs (1)
1408var messages = testSink.Writes.Select(write => write.State.ToString()).ToList();
PageLoggerExtensionsTest.cs (7)
34var write = Assert.Single(testSink.Writes); 62var write = Assert.Single(testSink.Writes); 90var write = Assert.Single(testSink.Writes); 118var write = Assert.Single(testSink.Writes); 150var write = Assert.Single(testSink.Writes); 179Assert.Equal(2, testSink.Writes.Count); 180var enumerator = testSink.Writes.GetEnumerator();
Microsoft.AspNetCore.OutputCaching.Tests (47)
OutputCacheMiddlewareTests.cs (34)
48sink.Writes, 64sink.Writes, 92sink.Writes, 122sink.Writes, 150sink.Writes, 166Assert.Empty(sink.Writes); 189Assert.Single(sink.Writes); 194Assert.Equal(2, sink.Writes.Count); 202sink.Writes, 231Assert.Single(sink.Writes); 236Assert.Equal(2, sink.Writes.Count); 244sink.Writes, 266sink.Writes, 286Assert.Empty(sink.Writes); 300Assert.Empty(sink.Writes); 331sink.Writes, 347Assert.Empty(sink.Writes); 363sink.Writes, 415Assert.Empty(sink.Writes); 438Assert.Empty(sink.Writes); 466Assert.Empty(sink.Writes); 492Assert.Empty(sink.Writes); 530Assert.Empty(sink.Writes); 548Assert.Empty(sink.Writes); 570Assert.Empty(sink.Writes); 585Assert.Empty(sink.Writes); 624sink.Writes, 653sink.Writes, 686sink.Writes, 711sink.Writes, 732sink.Writes, 753sink.Writes, 783sink.Writes, 987sink.Writes,
OutputCachePolicyProviderTests.cs (13)
58Assert.Empty(sink.Writes); 107Assert.Empty(sink.Writes); 123Assert.Empty(sink.Writes); 137Assert.Empty(sink.Writes); 155Assert.Empty(sink.Writes); 173Assert.Empty(sink.Writes); 191Assert.Empty(sink.Writes); 219Assert.Empty(sink.Writes); 237Assert.Empty(sink.Writes); 253Assert.Empty(sink.Writes); 347Assert.Empty(sink.Writes); 370Assert.Empty(sink.Writes); 393Assert.Empty(sink.Writes);
Microsoft.AspNetCore.RateLimiting.Tests (1)
RateLimitingMiddlewareTests.cs (1)
157var logMessages = sink.Writes.ToList();
Microsoft.AspNetCore.RequestDecompression.Tests (10)
DefaultRequestDecompressionProviderTests.cs (4)
43var logMessages = sink.Writes.ToList(); 68var logMessages = sink.Writes.ToList(); 95var logMessages = sink.Writes.ToList(); 123var logMessages = sink.Writes.ToList();
RequestDecompressionMiddlewareTests.cs (6)
247var logMessages = sink.Writes.ToList(); 318var logMessages = sink.Writes.ToList(); 394var logMessages = sink.Writes.ToList(); 496var logMessages = sink.Writes.ToList(); 580var logMessages = sink.Writes.ToList(); 736return (sink.Writes.ToList(), outputContent);
Microsoft.AspNetCore.ResponseCaching.Tests (77)
ResponseCachingMiddlewareTests.cs (40)
32sink.Writes, 47sink.Writes, 71sink.Writes, 100sink.Writes, 120sink.Writes, 148sink.Writes, 172sink.Writes, 184Assert.Empty(sink.Writes); 200Assert.Single(sink.Writes); 205Assert.Equal(2, sink.Writes.Count); 213sink.Writes, 232Assert.Single(sink.Writes); 238Assert.Equal(2, sink.Writes.Count); 247sink.Writes, 267sink.Writes, 285Assert.Empty(sink.Writes); 297Assert.Empty(sink.Writes); 326sink.Writes, 340Assert.Empty(sink.Writes); 354sink.Writes, 413Assert.Empty(sink.Writes); 428Assert.Empty(sink.Writes); 441Assert.Empty(sink.Writes); 464Assert.Empty(sink.Writes); 489Assert.Empty(sink.Writes); 514Assert.Empty(sink.Writes); 542sink.Writes, 573sink.Writes, 614Assert.Empty(sink.Writes); 632Assert.Empty(sink.Writes); 651Assert.Empty(sink.Writes); 666Assert.Empty(sink.Writes); 682sink.Writes, 708sink.Writes, 737sink.Writes, 770sink.Writes, 798sink.Writes, 818sink.Writes, 840sink.Writes, 869sink.Writes,
ResponseCachingPolicyProviderTests.cs (37)
33Assert.Empty(sink.Writes); 63sink.Writes, 77sink.Writes, 93Assert.Empty(sink.Writes); 109sink.Writes, 123sink.Writes, 137Assert.Empty(sink.Writes); 152Assert.Empty(sink.Writes); 163sink.Writes, 178Assert.Empty(sink.Writes); 194sink.Writes, 211sink.Writes, 228sink.Writes, 245sink.Writes, 262sink.Writes, 279Assert.Empty(sink.Writes); 356sink.Writes, 376Assert.Empty(sink.Writes); 397sink.Writes, 418Assert.Empty(sink.Writes); 439sink.Writes, 460Assert.Empty(sink.Writes); 481sink.Writes, 496Assert.Empty(sink.Writes); 514Assert.Empty(sink.Writes); 534sink.Writes, 555Assert.Empty(sink.Writes); 576sink.Writes, 598Assert.Empty(sink.Writes); 620sink.Writes, 643sink.Writes, 666sink.Writes, 690sink.Writes, 713sink.Writes, 737sink.Writes, 762sink.Writes, 787sink.Writes,
Microsoft.AspNetCore.ResponseCompression.Tests (4)
ResponseCompressionMiddlewareTest.cs (4)
481var logMessages = sink.Writes.ToList(); 544var logMessages = sink.Writes.ToList(); 607var logMessages = sink.Writes.ToList(); 1286return (response, sink.Writes.ToList());
Microsoft.AspNetCore.Routing.Tests (20)
ConstraintMatcherTest.cs (3)
43Assert.Empty(sink.Writes); 61var write = Assert.Single(sink.Writes); 78Assert.Empty(sink.Writes);
DefaultLinkParserTest.cs (3)
36sink.Writes, 58sink.Writes, 82sink.Writes,
EndpointRoutingMiddlewareTest.cs (8)
87var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "MatchSuccess")); 259var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "FallbackMatch")); 264Assert.DoesNotContain(sink.Writes, w => w.EventId.Name == "FallbackMatch"); 293var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "RequestSizeFeatureIsReadOnly")); 322var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "RequestSizeFeatureNotFound")); 350var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "RequestSizeLimitMetadataNotFound")); 384var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "MaxRequestBodySizeDisabled")); 389var write = Assert.Single(sink.Writes.Where(w => w.EventId.Name == "MaxRequestBodySizeSet"));
Matching\DfaMatcherTest.cs (4)
800sink.Writes, 830sink.Writes, 870sink.Writes, 912sink.Writes,
RouterMiddlewareTest.cs (2)
92var write = Assert.Single(sink.Writes); 123Assert.Empty(sink.Writes);
Microsoft.AspNetCore.Session.Tests (17)
SessionTests.cs (17)
366var sessionLogMessages = sink.Writes.ToList(); 431var sessionLogMessages = sink.Writes.ToList(); 681Assert.NotEmpty(sink.Writes); 682var message = sink.Writes.First(); 730Assert.NotEmpty(sink.Writes); 731var message = sink.Writes.First(); 779var message = Assert.Single(sink.Writes); 827Assert.Empty(sink.Writes); 879var sessionLogMessage = sink.Writes.Where(message => message.LoggerName.Equals(typeof(DistributedSession).FullName, StringComparison.Ordinal)).Single(); 884var sessionMiddlewareLogMessage = sink.Writes.Where(message => message.LoggerName.Equals(typeof(SessionMiddleware).FullName, StringComparison.Ordinal)).Single(); 942var sessionLogMessages = sink.Writes.Where(message => message.LoggerName.Equals(typeof(DistributedSession).FullName, StringComparison.Ordinal)).ToList(); 950var sessionMiddlewareLogs = sink.Writes.Where(message => message.LoggerName.Equals(typeof(SessionMiddleware).FullName, StringComparison.Ordinal)).ToList(); 1009var sessionLogMessages = sink.Writes.Where(message => message.LoggerName.Equals(typeof(DistributedSession).FullName, StringComparison.Ordinal)).ToList(); 1017Assert.DoesNotContain(sink.Writes, message => message.LoggerName.Equals(typeof(SessionMiddleware).FullName, StringComparison.Ordinal)); 1073var sessionLogMessages = sink.Writes.Where(message => message.LoggerName.Equals(typeof(DistributedSession).FullName, StringComparison.Ordinal)).ToList(); 1081Assert.DoesNotContain(sink.Writes, message => message.LoggerName.Equals(typeof(SessionMiddleware).FullName, StringComparison.Ordinal)); 1125var message = Assert.Single(sink.Writes);
Microsoft.AspNetCore.SignalR.Client.Tests (1)
HttpConnectionTests.cs (1)
159var writeList = testSink.Writes.ToList();
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
RedisHubLifetimeManagerTests.cs (1)
122var logs = testSink.Writes.ToArray();
Microsoft.Extensions.Diagnostics.HealthChecks.Tests (3)
HealthCheckPublisherHostedServiceTest.cs (3)
221sink.Writes, 486sink.Writes, 692sink.Writes,
Microsoft.Extensions.Localization.Tests (1)
ResourceManagerStringLocalizerTest.cs (1)
139var write = Assert.Single(Sink.Writes);