Index: Application/Ringtoets/test/Application.Ringtoets.Storage.Test/StorageSqLiteTest.cs =================================================================== diff -u -r7a542dea56b0bcfbbd4dd6f2c6abcafcfaa5f753 -r3ce8a0c103af363c8e00798d95588ebe4d1e04a5 --- Application/Ringtoets/test/Application.Ringtoets.Storage.Test/StorageSqLiteTest.cs (.../StorageSqLiteTest.cs) (revision 7a542dea56b0bcfbbd4dd6f2c6abcafcfaa5f753) +++ Application/Ringtoets/test/Application.Ringtoets.Storage.Test/StorageSqLiteTest.cs (.../StorageSqLiteTest.cs) (revision 3ce8a0c103af363c8e00798d95588ebe4d1e04a5) @@ -75,19 +75,15 @@ { // Setup string nonExistingPath = "fileDoesNotExist"; - string expectedMessage = String.Format(@"Fout bij het lezen van bestand '{0}': ", nonExistingPath); - string expectedInnerMessage = "Het bestand bestaat niet."; + string expectedMessage = String.Format(@"Fout bij het lezen van bestand '{0}': {1}", nonExistingPath, "Het bestand bestaat niet."); // Call TestDelegate test = () => new StorageSqLite().LoadProject(nonExistingPath); // Assert - StorageException exception = Assert.Throws(test); + StorageException exception = Assert.Throws(test); - Assert.IsInstanceOf(exception); Assert.AreEqual(expectedMessage, exception.Message); - Assert.IsInstanceOf(exception.InnerException); - Assert.AreEqual(expectedInnerMessage, exception.InnerException.Message); } [Test] @@ -96,15 +92,14 @@ // Setup string validPath = "empty.rtd"; var tempFile = Path.Combine(testDataPath, validPath); - var expectedInnerMessage = String.Format(@"Het bestand '{0}' is geen geldig Ringtoets bestand.", tempFile); + string expectedMessage = String.Format(@"Fout bij het lezen van bestand '{0}': {1}", tempFile, @"Het bestand is geen geldig Ringtoets bestand."); // Call TestDelegate test = () => new StorageSqLite().LoadProject(tempFile); // Assert - StorageException exception = Assert.Throws(test); - Assert.IsInstanceOf(exception.InnerException); - Assert.AreEqual(expectedInnerMessage, exception.InnerException.Message); + StorageException exception = Assert.Throws(test); + Assert.AreEqual(expectedMessage, exception.Message); } [Test] @@ -138,7 +133,7 @@ public void LoadProject_CorruptRingtoetsFileThatPassesValidation_ThrowsStorageExceptionWithFullStackTrace() { // Setup - var expectedMessage = String.Format(@"Fout bij het lezen van bestand '{0}': ", tempRingtoetsFile); + string expectedMessage = String.Format(@"Fout bij het lezen van bestand '{0}': {1}", tempRingtoetsFile, @"Het bestand is geen geldig Ringtoets bestand."); var expectedInnerExceptionMessage = "An error occurred while executing the command definition. See the inner exception for details."; var expectedInnerExceptionInnerExceptionMessage = "SQL logic error or missing database" + Environment.NewLine + "no such table: ProjectEntity";