Aspects.Logging.Nlog.Tests.NlogLoggerWrapperTests.WhenCallingErrorShouldRecordOneError C# (CSharp) Method

WhenCallingErrorShouldRecordOneError() private method

private WhenCallingErrorShouldRecordOneError ( ) : void
return 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");
        }