1 write to Exception
Microsoft.Extensions.Diagnostics.Testing (1)
Logging\FakeLogRecord.cs (1)
35Exception = exception;
155 references to Exception
Microsoft.AspNetCore.Diagnostics.Middleware.Tests (18)
Logging\AcceptanceTests.cs (12)
179Assert.Null(logCollector.LatestRecord.Exception); 239Assert.Null(logCollector.LatestRecord.Exception); 305Assert.All(logRecords, x => Assert.Null(x.Exception)); 367Assert.Null(lastRecord.Exception); 413Assert.Null(logCollector.LatestRecord.Exception); 455Assert.Null(logCollector.LatestRecord.Exception); 486Assert.All(logRecords, x => Assert.Null(x.Exception)); 524Assert.All(logRecords, x => Assert.Null(x.Exception)); 575Assert.Null(logCollector.LatestRecord.Exception); 616Assert.Null(logCollector.LatestRecord.Exception); 650Assert.Null(logCollector.LatestRecord.Exception); 751Assert.IsType<InvalidOperationException>(logCollector.GetSnapshot()[0].Exception);
Logging\AcceptanceTests.Mvc.cs (5)
73Assert.Null(logRecord.Exception); 108Assert.Null(logRecord.Exception); 154Assert.Null(logRecord.Exception); 198Assert.Null(logRecord.Exception); 239Assert.Null(logRecord.Exception);
Logging\AcceptanceTests.Routing.cs (1)
73Assert.Null(logRecord.Exception);
Microsoft.Extensions.Diagnostics.Testing.Tests (3)
Logging\FakeLoggerTests.cs (3)
38Assert.Null(records[0].Exception); 47Assert.Null(records[0].Exception); 55Assert.Null(logger.LatestRecord.Exception);
Microsoft.Extensions.Http.Diagnostics.Tests (8)
Logging\AcceptanceTests.cs (3)
48Assert.Null(logRecord.Exception); 81Assert.IsType<NotSupportedException>(firstLogRecord.Exception); 89Assert.Null(secondLogRecord.Exception);
Logging\HttpClientLoggerTest.cs (5)
442Assert.Same(exception, logRecord.Exception); 781Assert.Equal(exception, logRecords[0].Exception); 826Assert.Equal(enrichmentException, logRecords[0].Exception); 829Assert.Equal(sendAsyncException, logRecords[1].Exception); 989Assert.Same(exception, logRecord.Exception);
Microsoft.Extensions.Telemetry.Tests (14)
Logging\ExtendedLoggerTests.cs (14)
78Assert.Null(snap[0].Exception); 94Assert.Null(snap[1].Exception); 163Assert.Null(snap[0].Exception); 170Assert.Null(snap[1].Exception); 228Assert.Null(snap[0].Exception); 235Assert.Null(snap[1].Exception); 242Assert.Null(snap[2].Exception); 249Assert.Null(snap[3].Exception); 288Assert.Null(snap[0].Exception); 357Assert.Null(snap[0].Exception); 466Assert.Null(snap[0].Exception); 471Assert.NotNull(snap[1].Exception); 476Assert.Null(snap[2].Exception); 481Assert.NotNull(snap[3].Exception);
Microsoft.Gen.Logging.Generated.Tests (112)
DataClassificationTests.cs (1)
22Assert.Null(collector.LatestRecord.Exception);
LoggerFromMemberTests.cs (12)
24Assert.Null(collector.LatestRecord.Exception); 41Assert.Null(collector.LatestRecord.Exception); 62Assert.Null(collector.LatestRecord.Exception); 79Assert.Null(collector.LatestRecord.Exception); 100Assert.Null(collector.LatestRecord.Exception); 114Assert.Null(collector.LatestRecord.Exception); 130Assert.Null(logger.Collector.LatestRecord.Exception); 140Assert.Null(logger.Collector.LatestRecord.Exception); 143Assert.Null(logger2.Collector.LatestRecord.Exception); 157Assert.Null(collector.LatestRecord.Exception); 174Assert.Null(collector.LatestRecord.Exception); 179Assert.Null(collector.LatestRecord.Exception);
LoggerMessageAttributeTests.cs (13)
21Assert.Null(collector.LatestRecord.Exception); 34Assert.Null(collector.LatestRecord.Exception); 47Assert.Null(collector.LatestRecord.Exception); 53Assert.Null(collector.LatestRecord.Exception); 66Assert.Null(collector.LatestRecord.Exception); 72Assert.Null(collector.LatestRecord.Exception); 78Assert.Null(collector.LatestRecord.Exception); 91Assert.Null(collector.LatestRecord.Exception); 97Assert.Null(collector.LatestRecord.Exception); 110Assert.Null(collector.LatestRecord.Exception); 138Assert.Null(collector.LatestRecord.Exception); 144Assert.Null(collector.LatestRecord.Exception); 156Assert.Null(collector.LatestRecord.Exception);
LogMethodTests.cs (63)
26Assert.Null(collector.LatestRecord.Exception); 33Assert.Null(collector.LatestRecord.Exception); 40Assert.Null(collector.LatestRecord.Exception); 53Assert.Null(collector.LatestRecord.Exception); 112Assert.Null(collector.LatestRecord.Exception); 118Assert.Null(collector.LatestRecord.Exception); 124Assert.Null(collector.LatestRecord.Exception); 130Assert.Equal("A", collector.LatestRecord.Exception!.Message); 136Assert.Equal("A", collector.LatestRecord.Exception!.Message); 142Assert.Equal("A", collector.LatestRecord.Exception!.Message); 148Assert.Equal("B", collector.LatestRecord.Exception!.Message); 223Assert.Null(collector.LatestRecord.Exception); 231Assert.Null(collector.LatestRecord.Exception); 239Assert.Null(collector.LatestRecord.Exception); 247Assert.Null(collector.LatestRecord.Exception); 255Assert.Null(collector.LatestRecord.Exception); 263Assert.Null(collector.LatestRecord.Exception); 271Assert.Null(collector.LatestRecord.Exception); 282Assert.Null(logRecord.Exception); 293Assert.Null(logRecord.Exception); 308Assert.Null(collector.LatestRecord.Exception); 315Assert.Null(collector.LatestRecord.Exception); 322Assert.Null(collector.LatestRecord.Exception); 329Assert.Null(collector.LatestRecord.Exception); 336Assert.Null(collector.LatestRecord.Exception); 344Assert.Null(collector.LatestRecord.Exception); 361Assert.Null(collector.LatestRecord.Exception); 368Assert.Null(collector.LatestRecord.Exception); 378Assert.Null(logRecord.Exception); 403Assert.Null(collector.LatestRecord.Exception); 410Assert.Null(collector.LatestRecord.Exception); 417Assert.Null(collector.LatestRecord.Exception); 424Assert.Null(collector.LatestRecord.Exception); 431Assert.Null(collector.LatestRecord.Exception); 438Assert.Null(collector.LatestRecord.Exception); 445Assert.Null(collector.LatestRecord.Exception); 452Assert.Null(collector.LatestRecord.Exception); 459Assert.Null(collector.LatestRecord.Exception); 466Assert.Null(collector.LatestRecord.Exception); 481Assert.Null(collector.LatestRecord.Exception); 488Assert.Null(collector.LatestRecord.Exception); 495Assert.Null(collector.LatestRecord.Exception); 509Assert.Null(collector.LatestRecord.Exception); 526Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 533Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 540Assert.Equal("Foo", collector.LatestRecord.Exception!.Message); 549Assert.NotNull(collector.LatestRecord.Exception); 550Assert.Equal(exception.Message, collector.LatestRecord.Exception!.Message); 551Assert.Equal(exception.GetType(), collector.LatestRecord.Exception!.GetType()); 564Assert.Null(collector.LatestRecord.Exception); 575Assert.Null(logRecord.Exception); 590Assert.Null(collector.LatestRecord.Exception); 597Assert.Null(collector.LatestRecord.Exception); 604Assert.Null(collector.LatestRecord.Exception); 611Assert.Null(collector.LatestRecord.Exception); 618Assert.Null(collector.LatestRecord.Exception); 632Assert.Null(collector.LatestRecord.Exception); 640Assert.Null(collector.LatestRecord.Exception); 648Assert.Null(collector.LatestRecord.Exception); 662Assert.Null(collector.LatestRecord.Exception); 678Assert.Null(collector.LatestRecord.Exception); 692Assert.Null(collector.LatestRecord.Exception); 763Assert.NotNull(collector.LatestRecord.Exception);
LogPropertiesRedactionTests.cs (6)
30Assert.Null(collector.LatestRecord.Exception); 55Assert.Null(collector.LatestRecord.Exception); 79Assert.Null(collector.LatestRecord.Exception); 109Assert.Null(collector.LatestRecord.Exception); 139Assert.Null(collector.LatestRecord.Exception); 164Assert.Null(collector.LatestRecord.Exception);
LogPropertiesTests.cs (8)
389Assert.Null(latestRecord.Exception); 419Assert.Null(latestRecord.Exception); 448Assert.Null(latestRecord.Exception); 472Assert.Null(latestRecord.Exception); 499Assert.Null(latestRecord.Exception); 523Assert.Null(latestRecord.Exception); 548Assert.Null(latestRecord.Exception); 574Assert.Null(latestRecord.Exception);
PrimaryConstructorTests.cs (4)
23Assert.Null(collector.LatestRecord.Exception); 37Assert.Null(collector.LatestRecord.Exception); 51Assert.Null(collector.LatestRecord.Exception); 65Assert.Null(collector.LatestRecord.Exception);
TagProviderTests.cs (5)
82Assert.Null(latestRecord.Exception); 105Assert.Null(latestRecord.Exception); 126Assert.Null(latestRecord.Exception); 137Assert.Null(latestRecord.Exception); 187Assert.Null(latestRecord.Exception);