File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
EventLogExpert.Eventing.Tests/EventResolvers
EventLogExpert.Eventing/Helpers Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -1612,10 +1612,11 @@ public void ResolveEvent_WithSeverityLevel_ShouldResolveLevelString()
16121612 var testCases = new [ ]
16131613 {
16141614 ( Level : ( byte ) 0 , Expected : "Information" ) ,
1615+ ( Level : ( byte ) 1 , Expected : "Critical" ) ,
16151616 ( Level : ( byte ) 2 , Expected : "Error" ) ,
16161617 ( Level : ( byte ) 3 , Expected : "Warning" ) ,
16171618 ( Level : ( byte ) 4 , Expected : "Information" ) ,
1618- ( Level : ( byte ) 5 , Expected : "5 " )
1619+ ( Level : ( byte ) 5 , Expected : "Verbose " )
16191620 } ;
16201621
16211622 foreach ( var testCase in testCases )
Original file line number Diff line number Diff line change @@ -7,17 +7,21 @@ public enum SeverityLevel
77{
88 Information ,
99 Warning ,
10- Error
10+ Error ,
11+ Critical ,
12+ Verbose
1113}
1214
1315public static class Severity
1416{
1517 public static string GetString ( byte ? level ) => level switch
1618 {
1719 0 => nameof ( SeverityLevel . Information ) ,
20+ 1 => nameof ( SeverityLevel . Critical ) ,
1821 2 => nameof ( SeverityLevel . Error ) ,
1922 3 => nameof ( SeverityLevel . Warning ) ,
2023 4 => nameof ( SeverityLevel . Information ) ,
24+ 5 => nameof ( SeverityLevel . Verbose ) ,
2125 _ => level ? . ToString ( ) ?? string . Empty
2226 } ;
2327}
You can’t perform that action at this time.
0 commit comments