Index: Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/OvertoppingCalculationWaveHeightParserTest.cs =================================================================== diff -u -rae5c94bea6f603eeafeed527190799ce2b049002 -r57c9aff5c1e30cb83c1cc2f33c7ce97dfe8d04fe --- Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/OvertoppingCalculationWaveHeightParserTest.cs (.../OvertoppingCalculationWaveHeightParserTest.cs) (revision ae5c94bea6f603eeafeed527190799ce2b049002) +++ Ringtoets/HydraRing/test/Ringtoets.HydraRing.Calculation.Test/Parsers/OvertoppingCalculationWaveHeightParserTest.cs (.../OvertoppingCalculationWaveHeightParserTest.cs) (revision 57c9aff5c1e30cb83c1cc2f33c7ce97dfe8d04fe) @@ -101,7 +101,6 @@ [Test] [TestCase("EmptyDatabase")] [TestCase("EmptyTableDesignBeta")] - [TestCase("EmptyTableDesignPointResults")] [TestCase("EmptyTableGoverningWind")] public void Parse_WithDataNotComplete_ThrowsHydraRingFileParserException(string subFolder) { @@ -155,36 +154,35 @@ } [Test] - public void Parse_NotAllColumnsHaveResults_ThrowsHydraRingFileParserException() + [TestCase(validFileOvertoppingDominant, 0.265866, true)] + [TestCase("ValidFileOvertoppingNotDominant", 0.000355406, false)] + public void Parse_ValidData_OutputSet(string file, double expectedWaveHeight, bool expectedOvertoppingDominant) { // Setup - string path = Path.Combine(testDirectory, "ValidFileNoWaveHeight"); + string path = Path.Combine(testDirectory, file); var parser = new OvertoppingCalculationWaveHeightParser(); // Call - TestDelegate test = () => parser.Parse(path, 1); + parser.Parse(path, 1); // Assert - var exception = Assert.Throws(test); - Assert.AreEqual("Er is geen resultaat voor overslag en overloop gevonden in de Hydra-Ring uitvoerdatabase.", exception.Message); - Assert.IsInstanceOf(exception.InnerException); + Assert.AreEqual(expectedWaveHeight, parser.Output.WaveHeight, 1e-11); + Assert.AreEqual(expectedOvertoppingDominant, parser.Output.IsOvertoppingDominant); } [Test] - [TestCase(validFileOvertoppingDominant, 0.265866, true)] - [TestCase("ValidFileOvertoppingNotDominant", 0.000355406, false)] - public void Parse_ValidData_OutputSet(string file, double expectedWaveHeight, bool expectedOvertoppingDominant) + public void Parse_WaveHeightNull_OutputSet() { // Setup - string path = Path.Combine(testDirectory, file); + string path = Path.Combine(testDirectory, "ValidFileWaveHeightNull"); var parser = new OvertoppingCalculationWaveHeightParser(); // Call parser.Parse(path, 1); // Assert - Assert.AreEqual(expectedWaveHeight, parser.Output.WaveHeight, 1e-11); - Assert.AreEqual(expectedOvertoppingDominant, parser.Output.IsOvertoppingDominant); + Assert.IsNaN(parser.Output.WaveHeight); + Assert.IsFalse(parser.Output.IsOvertoppingDominant); } } } \ No newline at end of file