Index: Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs =================================================================== diff -u -rbe66e1bec38a780abb27fedea8632acf4d24a173 -r2d7f22520e157ccfefbf12a4d9845de8bfb04f50 --- Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision be66e1bec38a780abb27fedea8632acf4d24a173) +++ Ringtoets/Piping/test/Ringtoets.Piping.IO.Test/SoilProfile/StochasticSoilModelReaderTest.cs (.../StochasticSoilModelReaderTest.cs) (revision 2d7f22520e157ccfefbf12a4d9845de8bfb04f50) @@ -44,14 +44,14 @@ public void Constructor_NonExistingPath_ThrowsCriticalFileReadException() { // Setup - var testFile = Path.Combine(testDataPath, "none.soil"); + string testFile = Path.Combine(testDataPath, "none.soil"); // Call TestDelegate test = () => { using (new StochasticSoilModelReader(testFile)) {} }; // Assert - var exception = Assert.Throws(test); - var expectedMessage = new FileReaderErrorMessageBuilder(testFile).Build(UtilsResources.Error_File_does_not_exist); + CriticalFileReadException exception = Assert.Throws(test); + string expectedMessage = new FileReaderErrorMessageBuilder(testFile).Build(UtilsResources.Error_File_does_not_exist); Assert.AreEqual(expectedMessage, exception.Message); } @@ -67,7 +67,7 @@ TestDelegate test = () => { using (new StochasticSoilModelReader(fileName)) {} }; // Assert - var exception = Assert.Throws(test); + CriticalFileReadException exception = Assert.Throws(test); Assert.AreEqual(expectedMessage, exception.Message); } @@ -77,8 +77,8 @@ public void Constructor_IncorrectFormatFileOrInvalidSchema_ThrowsPipingCriticalFileReadException(string dbName) { // Setup - var dbFile = Path.Combine(testDataPath, dbName); - var expectedMessage = new FileReaderErrorMessageBuilder(dbFile). + string dbFile = Path.Combine(testDataPath, dbName); + string expectedMessage = new FileReaderErrorMessageBuilder(dbFile). Build(String.Format(Resources.PipingSoilProfileReader_Critical_Unexpected_value_on_column, dbName)); // Precondition @@ -98,8 +98,8 @@ public void Constructor_InvalidSchemaThatPassesValidation_ThrowsPipingCriticalFileReadException(string dbName) { // Setup - var dbFile = Path.Combine(testDataPath, dbName); - var expectedMessage = new FileReaderErrorMessageBuilder(dbFile). + string dbFile = Path.Combine(testDataPath, dbName); + string expectedMessage = new FileReaderErrorMessageBuilder(dbFile). Build(String.Format(Resources.StochasticSoilModelDatabaseReader_Failed_to_read_database, dbName)); // Precondition @@ -118,7 +118,7 @@ public void ParameteredConstructor_PathToExistingFile_ExpectedValues() { // Setup - var dbName = "emptyschema.soil"; + string dbName = "emptyschema.soil"; string dbFile = Path.Combine(testDataPath, dbName); // Call @@ -138,7 +138,7 @@ const string version = "15.0.5.0"; string expectedVersionMessage = string.Format(Resources.PipingSoilProfileReader_Database_incorrect_version_requires_Version_0_, version); const string dbName = "incorrectversion.soil"; - var dbFile = Path.Combine(testDataPath, dbName); + string dbFile = Path.Combine(testDataPath, dbName); // Precondition Assert.IsTrue(TestHelper.CanOpenFileForWrite(dbFile), "Precondition: file can be opened for edits."); @@ -147,7 +147,7 @@ TestDelegate test = () => { using (new StochasticSoilModelReader(dbFile)) {} }; // Assert - var exception = Assert.Throws(test); + CriticalFileReadException exception = Assert.Throws(test); Assert.AreEqual(expectedVersionMessage, exception.Message); Assert.IsTrue(TestHelper.CanOpenFileForWrite(dbFile)); } @@ -156,7 +156,7 @@ public void HasNext_EmptyDatabase_ReturnsFalse() { // Setup - var dbName = "emptyschema.soil"; + string dbName = "emptyschema.soil"; string dbFile = Path.Combine(testDataPath, dbName); using (var stochasticSoilModelDatabaseReader = new StochasticSoilModelReader(dbFile)) @@ -175,7 +175,7 @@ public void HasNext_CompleteDatabase_ReturnsTrue() { // Setup - var dbName = "complete.soil"; + string dbName = "complete.soil"; string dbFile = Path.Combine(testDataPath, dbName); using (var stochasticSoilModelDatabaseReader = new StochasticSoilModelReader(dbFile)) @@ -216,7 +216,7 @@ public void ReadStochasticSoilModel_EmptyDatabase_ReturnsNull() { // Setup - var dbName = "emptyschema.soil"; + string dbName = "emptyschema.soil"; string dbFile = Path.Combine(testDataPath, dbName); const int expectedNrOfModels = 0; @@ -239,7 +239,7 @@ public void ReadStochasticSoilModel_ModelWithoutProfile_ThreeModelsWithSecondWithoutProfiles() { // Setup - var dbName = "modelWithoutProfile.soil"; + string dbName = "modelWithoutProfile.soil"; string dbFile = Path.Combine(testDataPath, dbName); const int expectedNrOfModels = 3;