@@ -15,7 +15,8 @@ public class ConfigurationSettingsTests
15
15
static LoggerConfiguration ConfigFromJson ( string jsonString , string secondJsonSource = null )
16
16
{
17
17
var builder = new ConfigurationBuilder ( ) . AddJsonString ( jsonString ) ;
18
- if ( secondJsonSource != null ) builder . AddJsonString ( secondJsonSource ) ;
18
+ if ( secondJsonSource != null )
19
+ builder . AddJsonString ( secondJsonSource ) ;
19
20
var config = builder . Build ( ) ;
20
21
return new LoggerConfiguration ( )
21
22
. ReadFrom . Configuration ( config ) ;
@@ -33,7 +34,7 @@ public void PropertyEnrichmentIsApplied()
33
34
}
34
35
}
35
36
}" ;
36
-
37
+
37
38
var log = ConfigFromJson ( json )
38
39
. WriteTo . Sink ( new DelegatingSink ( e => evt = e ) )
39
40
. CreateLogger ( ) ;
@@ -116,7 +117,7 @@ public void AuditSinksAreConfigured()
116
117
117
118
var log = ConfigFromJson ( json )
118
119
. CreateLogger ( ) ;
119
-
120
+
120
121
DummyRollingFileSink . Emitted . Clear ( ) ;
121
122
DummyRollingFileAuditSink . Emitted . Clear ( ) ;
122
123
@@ -229,7 +230,7 @@ public void LoggingLevelSwitchWithInvalidNameThrowsFormatException()
229
230
""LevelSwitches"": {""switchNameNotStartingWithDollar"" : ""Warning"" }
230
231
}
231
232
}" ;
232
-
233
+
233
234
var ex = Assert . Throws < FormatException > ( ( ) => ConfigFromJson ( json ) ) ;
234
235
235
236
Assert . Contains ( "\" switchNameNotStartingWithDollar\" " , ex . Message ) ;
@@ -273,7 +274,7 @@ public void SettingMinimumLevelControlledByToAnUndeclaredSwitchThrows()
273
274
}
274
275
}
275
276
}" ;
276
-
277
+
277
278
var ex = Assert . Throws < InvalidOperationException > ( ( ) =>
278
279
ConfigFromJson ( json )
279
280
. CreateLogger ( ) ) ;
@@ -334,7 +335,7 @@ public void ReferencingAnUndeclaredSwitchInSinkThrows()
334
335
}]
335
336
}
336
337
}" ;
337
-
338
+
338
339
var ex = Assert . Throws < InvalidOperationException > ( ( ) =>
339
340
ConfigFromJson ( json )
340
341
. CreateLogger ( ) ) ;
@@ -546,8 +547,8 @@ public void WriteToSubLoggerWithLevelSwitchIsSupported()
546
547
}
547
548
}]
548
549
}
549
- }" ;
550
-
550
+ }" ;
551
+
551
552
var log = ConfigFromJson ( json )
552
553
. CreateLogger ( ) ;
553
554
@@ -590,7 +591,8 @@ public void MultipleArgumentValuesThrowsInvalidOperationException()
590
591
// the multiple values are recognized; it will never attempt to locate
591
592
// a matching argument.
592
593
593
- var ex = Assert . Throws < InvalidOperationException > ( ( ) => ConfigFromJson ( jsonDiscreteValue , jsonComplexValue ) ) ;
594
+ var ex = Assert . Throws < InvalidOperationException > ( ( )
595
+ => ConfigFromJson ( jsonDiscreteValue , jsonComplexValue ) ) ;
594
596
595
597
Assert . Contains ( "Combined configuration sources" , ex . Message ) ;
596
598
Assert . Contains ( "pathFormat" , ex . Message ) ;
0 commit comments