Skip to content

Commit c2db1ef

Browse files
Improve coverage of StandardLayout.
1 parent 192789c commit c2db1ef

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Take2/NuLog.Tests/Unit/Layouts/Standard/StandardLayoutTests.cs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,28 @@ public void Should_HandleNullPropertyValue() {
452452
Assert.Equal("", formatted);
453453
}
454454

455+
[Fact(DisplayName = "Should_LoadSplitPathFromCache")]
456+
public void Should_LoadSplitPathFromCache() {
457+
// Not really a unit test, but just "touches" a line of code that we'd otherwise not
458+
// test. Setup
459+
var parms = new List<LayoutParameter>
460+
{
461+
new LayoutParameter
462+
{
463+
Path = "Enumerable"
464+
}
465+
};
466+
var logEvent = new LogEvent();
467+
var paramParser = A.Fake<IPropertyParser>();
468+
469+
// Build our layout
470+
var layout = GetLayout(parms, paramParser);
471+
472+
// Execute, twice, so that we hit the cache
473+
layout.Format(logEvent);
474+
layout.Format(logEvent);
475+
}
476+
455477
/// <summary>
456478
/// Get a new instance of the layout under test.
457479
/// </summary>

0 commit comments

Comments
 (0)