Skip to content

Commit

Permalink
Merge pull request serilog#1055 from tsimbalar/resharper-warnings-3
Browse files Browse the repository at this point in the history
Remove more ReSharper warnings
  • Loading branch information
tsimbalar authored Nov 7, 2017
2 parents 3cd376c + f03e544 commit 9f27375
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/Serilog.Tests/MethodOverloadConventionTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public void ValidateWriteEventLogMethods(Type loggerType)
//handle silent logger special case i.e. no result validation
if (loggerType == typeof(SilentLogger))
return;

EvaluateSingleResult(level, sink);
}

Expand Down Expand Up @@ -177,6 +177,7 @@ public void ValidateBindMessageTemplateMethods(Type loggerType)
{
var method = loggerType.GetMethod("BindMessageTemplate");

Assert.NotNull(method);
Assert.Equal(method.ReturnType, typeof(bool));
Assert.True(method.IsPublic);

Expand Down Expand Up @@ -219,7 +220,7 @@ public void ValidateBindMessageTemplateMethods(Type loggerType)
//silentlogger is always false
if (loggerType == typeof(SilentLogger))
return;

Assert.True(result as bool?);

//test null arg path
Expand All @@ -238,6 +239,7 @@ public void ValidateBindPropertyMethods(Type loggerType)
{
var method = loggerType.GetMethod("BindProperty");

Assert.NotNull(method);
Assert.Equal(method.ReturnType, typeof(bool));
Assert.True(method.IsPublic);

Expand Down Expand Up @@ -274,7 +276,7 @@ public void ValidateBindPropertyMethods(Type loggerType)
//silentlogger will always be false
if (loggerType == typeof(SilentLogger))
return;

Assert.True(result as bool?);

//test null arg path/ invalid property name
Expand All @@ -293,6 +295,7 @@ public void ValidateIsEnabledMethods(Type loggerType)
{
var method = loggerType.GetMethod("IsEnabled");

Assert.NotNull(method);
Assert.True(method.IsPublic);
Assert.Equal(method.ReturnType, typeof(bool));

Expand Down

0 comments on commit 9f27375

Please sign in to comment.