Skip to content

Commit

Permalink
Added tests for other layout declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieu committed May 2, 2016
1 parent c3140ba commit 80f9e7d
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/NLog.UnitTests/LayoutRenderers/Wrappers/WrapLineTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@ namespace NLog.UnitTests.LayoutRenderers.Wrappers

public class WrapLineTests : NLogTestBase
{
[Fact]
{
MappedDiagnosticsContext.Clear();
MappedDiagnosticsContext.Set("foo", "foobar");

SimpleLayout le = "${wrapline:${mdc:foo}:WrapLine=3}";

Assert.Equal("foo" + System.Environment.NewLine + "bar", le.Render(LogEventInfo.CreateNullEvent()));
}

[Fact]
{
MappedDiagnosticsContext.Clear();
MappedDiagnosticsContext.Set("foo", "foobar");

SimpleLayout le = "${wrapline:Inner=${mdc:foo}:WrapLine=3}";

Assert.Equal("foo" + System.Environment.NewLine + "bar", le.Render(LogEventInfo.CreateNullEvent()));
}

[Fact]
public void WrapLineAtPositionOnceTest()
{
Expand Down

0 comments on commit 80f9e7d

Please sign in to comment.