Skip to content

Commit

Permalink
Merge pull request #17 from campersau/fix_logger_test_lang_specific
Browse files Browse the repository at this point in the history
logger format exception tests should not be locale specific
  • Loading branch information
jgauffin committed Jan 4, 2015
2 parents d57ea70 + 6b865c8 commit 7747d2b
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void format_a_simple_exception()
var sut = new BaseLoggerWrapper(GetType());
var actual = sut.FormatException(exception);

actual.Should().Be(" System.NotImplementedException: The method or operation is not implemented.\r\n");
actual.Should().StartWith(" System.NotImplementedException");
}

[Fact]
Expand All @@ -223,7 +223,8 @@ public void include_property_in_the_exception_output()
var sut = new BaseLoggerWrapper(GetType());
var actual = sut.FormatException(exception);

actual.Should().Be(" Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty: Exception of type 'Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty' was thrown.\r\n [UserId='10']\r\n");
actual.Should().StartWith(" Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty");
actual.Should().EndWith("[UserId='10']\r\n");
}

[Fact]
Expand All @@ -234,7 +235,8 @@ public void include_properties_in_the_exception_output()
var sut = new BaseLoggerWrapper(GetType());
var actual = sut.FormatException(exception);

actual.Should().Be(" Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty2: Exception of type 'Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty2' was thrown.\r\n [UserId='10',FirstName='Arne']\r\n");
actual.Should().StartWith(" Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty2");
actual.Should().EndWith("[UserId='10',FirstName='Arne']\r\n");
}

[Fact]
Expand All @@ -245,7 +247,8 @@ public void ignore_null_properties_in_the_exception_output()
var sut = new BaseLoggerWrapper(GetType());
var actual = sut.FormatException(exception);

actual.Should().Be(" Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty2: Exception of type 'Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty2' was thrown.\r\n [UserId='10']\r\n");
actual.Should().StartWith(" Griffin.Core.Tests.Logging.Loggers.ExceptionWithProperty2");
actual.Should().EndWith("[UserId='10']\r\n");
}

}
Expand Down

0 comments on commit 7747d2b

Please sign in to comment.