Skip to content

Commit 253e9a0

Browse files
committed
Make the LineEndingExtensions class internal instead of public
1 parent 4f862bb commit 253e9a0

File tree

4 files changed

+19
-47
lines changed

4 files changed

+19
-47
lines changed

src/LineEnding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public enum LineEnding
2727
/// <summary>
2828
/// Extensions to the <see cref="LineEnding"/> enum type.
2929
/// </summary>
30-
public static class LineEndingExtensions
30+
internal static class LineEndingExtensions
3131
{
3232
/// <summary>
3333
/// Returns a string representation of the specified <paramref name="lineEnding"/>.

tests/LineEndingExtensionsTest.cs

Lines changed: 0 additions & 42 deletions
This file was deleted.

tests/LineEndingTest.cs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
using System;
2+
using FluentAssertions;
3+
using Xunit;
4+
5+
namespace Serilog.Formatting.Log4Net.Tests
6+
{
7+
public class LineEndingTest
8+
{
9+
[Fact]
10+
public void InvalidLineEnding()
11+
{
12+
Action action = () => _ = new Log4NetTextFormatter(c => c.UseLineEnding((LineEnding)4));
13+
14+
action.Should().ThrowExactly<ArgumentOutOfRangeException>()
15+
.WithMessage("The value of argument 'lineEnding' (4) is invalid for enum type 'LineEnding'.*");
16+
}
17+
}
18+
}

tests/PublicApi.Serilog.Formatting.Log4Net.approved.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,6 @@ namespace Serilog.Formatting.Log4Net
2727
LineFeed = 1,
2828
CarriageReturn = 2,
2929
}
30-
public static class LineEndingExtensions
31-
{
32-
public static string ToCharacters(this Serilog.Formatting.Log4Net.LineEnding lineEnding) { }
33-
}
3430
public class Log4NetTextFormatter : Serilog.Formatting.ITextFormatter
3531
{
3632
public Log4NetTextFormatter() { }

0 commit comments

Comments
 (0)