Skip to content

Commit 67e7ca8

Browse files
committed
more detailed test assertion and change text to match new exception
1 parent 5e6d67d commit 67e7ca8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Serilog.Settings.Configuration/Settings/Configuration/ConfigurationReader.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ IConfigurationArgumentValue GetArgumentValue(IConfigurationSection argumentSecti
226226
// values as a result of reading multiple configuration sources.
227227
if (argumentSection.Value != null && argumentSection.GetChildren().Any())
228228
throw new InvalidOperationException(
229-
$"The value for the argument {argumentSection.Path} is assigned different value " +
229+
$"The value for the argument '{argumentSection.Path}' is assigned different value " +
230230
"types in more than one configuration source. Ensure all configurations consistently " +
231231
"use either a scalar (int, string, boolean) or a complex (array, section, list, " +
232232
"POCO, etc.) type for this argument value.");

test/Serilog.Settings.Configuration.Tests/ConfigurationSettingsTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,8 @@ public void InconsistentComplexVsScalarArgumentValuesThrowsIOE()
594594
var ex = Assert.Throws<InvalidOperationException>(()
595595
=> ConfigFromJson(jsonDiscreteValue, jsonComplexValue));
596596

597-
Assert.Contains("Combined configuration sources", ex.Message);
598-
Assert.Contains("pathFormat", ex.Message);
597+
Assert.Contains("The value for the argument", ex.Message);
598+
Assert.Contains("'Serilog:WriteTo:0:Args:pathFormat'", ex.Message);
599599
}
600600
}
601601
}

0 commit comments

Comments
 (0)