Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ProfilesImporterTest.cs =================================================================== diff -u -r808d8de82712c31f26cf21ea82f849d7bb728caa -r39bbb7b4108d845bf7834c1b92a983e35109271f --- Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ProfilesImporterTest.cs (.../ProfilesImporterTest.cs) (revision 808d8de82712c31f26cf21ea82f849d7bb728caa) +++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/FileImporters/ProfilesImporterTest.cs (.../ProfilesImporterTest.cs) (revision 39bbb7b4108d845bf7834c1b92a983e35109271f) @@ -114,10 +114,10 @@ public void Import_FromPathContainingInvalidPathCharacters_FalseAndLogError() { // Setup - string filePath = "c:\\Invalid_Characters.shp"; + const string filePath = "c:\\Invalid_Characters.shp"; - var invalidFileNameChars = Path.GetInvalidPathChars(); - var invalidPath = filePath.Replace('_', invalidFileNameChars[0]); + var invalidPathChars = Path.GetInvalidPathChars(); + var invalidPath = filePath.Replace('_', invalidPathChars[0]); var testProfilesImporter = new TestProfilesImporter(testImportTarget, testReferenceLine, invalidPath); @@ -129,8 +129,9 @@ TestHelper.AssertLogMessages(call, messages => { string message = messages.First(); + string invalidChars = string.Join(", ", invalidPathChars); string expectedMessage = new FileReaderErrorMessageBuilder(invalidPath) - .Build(string.Format(CoreCommonUtilsResources.Error_Path_cannot_contain_Characters_0_, string.Join(", ", Path.GetInvalidPathChars()))); + .Build($"Bestandspad mag niet de volgende tekens bevatten: {invalidChars}"); StringAssert.StartsWith(expectedMessage, message); }); Assert.IsFalse(importResult);