Aspects.Logging.Nlog.Tests.NlogLoggerWrapperTests.WhenCallingErrorShouldRecordOneError C# (CSharp) 메소드

WhenCallingErrorShouldRecordOneError() 개인적인 메소드

private WhenCallingErrorShouldRecordOneError ( ) : void
리턴 void
        public void WhenCallingErrorShouldRecordOneError()
        {
            // act
            _logger.Error("Test String", new NotImplementedException());

            // assert
            _memoryTarget.Logs.Count.Should().Be(1, "because we only called the method once");
            _memoryTarget.Logs.All(log => log.Contains("Error")).Should().BeTrue("Because we only logged an Error");
        }