Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/DikeProfiles/DikeProfileDataReader.cs =================================================================== diff -u -r4339c599a8e0bc1265e7a07cb4d6ce3665562e76 -ra27dce61d57406a3f528e8970018c9c35b8c29cf --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/DikeProfiles/DikeProfileDataReader.cs (.../DikeProfileDataReader.cs) (revision 4339c599a8e0bc1265e7a07cb4d6ce3665562e76) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/DikeProfiles/DikeProfileDataReader.cs (.../DikeProfileDataReader.cs) (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -60,19 +60,20 @@ All = 1023 } - private const string idPattern = @"^ID\s+(?\w+)$"; - private const string versionPattern = @"^VERSIE\s+(?\S+)$"; - private const string orientationPattern = @"^RICHTING\s+(?-?\d+(?:\.\d+)?)$"; - private const string damTypePattern = @"^DAM\s+(?-?\d+)$"; - private const string profileTypePattern = @"^DAMWAND\s+(?-?\d+)$"; - private const string damHeightPattern = @"^DAMHOOGTE\s+(?-?\d+(?:\.\d+)?)$"; - private const string crestLevelPattern = @"^KRUINHOOGTE\s+(?-?\d+(?:\.\d+)?)$"; - private const string dikeGeometryPattern = @"^DIJK\s+(?-?\d+)$"; - private const string foreshoreGeometryPattern = @"^VOORLAND\s+(?-?\d+)$"; - private const string roughnessSectionPattern = @"^(?-?\d+(?:\.\d+)?)\s+(?-?\d+(?:\.\d+)?)\s+(?-?\d+(?:\.\d+)?)$"; - private const string memoPattern = @"^MEMO$"; + private const string idPattern = @"^ID\s+(?.+?)\s*$"; + private const string versionPattern = @"^VERSIE(\s+(?.+?)?)?\s*$"; + private const string orientationPattern = @"^RICHTING(\s+(?.+?)?)?\s*$"; + private const string damTypePattern = @"^DAM(\s+(?.+?)?)?\s*$"; + private const string profileTypePattern = @"^DAMWAND(\s+(?.+?)?)?\s*$"; + private const string damHeightPattern = @"^DAMHOOGTE(\s+(?.+?)?)?\s*$"; + private const string crestLevelPattern = @"^KRUINHOOGTE(\s+(?.+?)?)?\s*$"; + private const string dikeGeometryPattern = @"^DIJK\s+(?.+?)?\s*$"; + private const string foreshoreGeometryPattern = @"^VOORLAND\s+(?.+?)?\s*$"; + private const string roughnessSectionPattern = @"^(?.+?)?\s+(?.+?)?\s+(?.+?)?\s*$"; + private const string memoPattern = @"^MEMO\s*$"; private string fileBeingRead; + private ParametersFoundInFile readParameters; /// /// Reads the *.prfl file for dike profile data. @@ -91,7 +92,7 @@ // TODO: Duplicate entries var data = new DikeProfileData(); - ParametersFoundInFile readParameters = ParametersFoundInFile.None; + readParameters = ParametersFoundInFile.None; using (var reader = new StreamReader(filePath)) { fileBeingRead = filePath; @@ -105,17 +106,8 @@ continue; } - Match versionMatch = new Regex(versionPattern).Match(text); - if (versionMatch.Success) + if (TryReadVersion(text, lineNumber)) { - if (!new Version(versionMatch.Groups["version"].Value).Equals(new Version(4, 0))) - { - string message = Resources.DikeProfileDataReader_ReadDikeProfileData_Only_version_four_zero_supported; - throw CreateCriticalFileReadException(lineNumber, message); - } - ; - // TODO: Versie can be parsed - readParameters |= ParametersFoundInFile.VERSIE; continue; } @@ -127,67 +119,32 @@ readParameters |= ParametersFoundInFile.ID; continue; } - Match orientationMatch = new Regex(orientationPattern).Match(text); - if (orientationMatch.Success) + + if (TryReadOrientation(text, data, lineNumber)) { - var orientation = double.Parse(orientationMatch.Groups["orientation"].Value, CultureInfo.InvariantCulture); - if (orientation < 0.0 || orientation > 360.0) - { - string message = string.Format(Resources.DikeProfileDataReader_ReadDikeProfileData_Orientation_0_must_be_in_range, - orientation); - throw CreateCriticalFileReadException(lineNumber, message); - } - data.Orientation = orientation; - // TODO: Validate can be parsed - readParameters |= ParametersFoundInFile.RICHTING; continue; } - Match damTypeMatch = new Regex(damTypePattern).Match(text); - if (damTypeMatch.Success) + + if (TryReadDamType(text, data, lineNumber)) { - var damTypeValue = int.Parse(damTypeMatch.Groups["damtype"].Value, CultureInfo.InvariantCulture); - if (!CanSafelyCastToEnum(damTypeValue)) - { - string message = string.Format(Resources.DikeProfileDataReader_ReadDikeProfileData_DamType_0_must_be_in_range, - damTypeValue); - throw CreateCriticalFileReadException(lineNumber, message); - } - data.DamType = (DamType)damTypeValue; - // TODO: Validate can be parsed - readParameters |= ParametersFoundInFile.DAM; continue; } - Match profileTypeMatch = new Regex(profileTypePattern).Match(text); - if (profileTypeMatch.Success) + + if (TryReadProfileType(text, data, lineNumber)) { - var profileTypeValue = int.Parse(profileTypeMatch.Groups["profiletype"].Value, CultureInfo.InvariantCulture); - if (!CanSafelyCastToEnum(profileTypeValue)) - { - string message = string.Format(Resources.DikeProfileDataReader_ReadDikeProfileData_ProfileType_0_must_be_in_range, - profileTypeValue); - throw CreateCriticalFileReadException(lineNumber, message); - } - data.ProfileType = (ProfileType)profileTypeValue; - // TODO: Validate can be parsed - readParameters |= ParametersFoundInFile.DAMWAND; continue; } - Match damHeightMatch = new Regex(damHeightPattern).Match(text); - if (damHeightMatch.Success) + + if (TryReadDamHeight(text, data, lineNumber)) { - data.DamHeight = double.Parse(damHeightMatch.Groups["damheight"].Value, CultureInfo.InvariantCulture); - // TODO: Validate can be parsed - readParameters |= ParametersFoundInFile.DAMHOOGTE; continue; } - Match crestLevelMatch = new Regex(crestLevelPattern).Match(text); - if (crestLevelMatch.Success) + + if (TryReadCrestLevel(text, data, lineNumber)) { - data.CrestLevel = double.Parse(crestLevelMatch.Groups["crestlevel"].Value, CultureInfo.InvariantCulture); - // TODO: Validate can be parsed - readParameters |= ParametersFoundInFile.KRUINHOOGTE; continue; } + Match dikeGeometryMatch = new Regex(dikeGeometryPattern).Match(text); if (dikeGeometryMatch.Success) { @@ -235,6 +192,7 @@ readParameters |= ParametersFoundInFile.DIJK; continue; } + Match foreshoreGeometryMatch = new Regex(foreshoreGeometryPattern).Match(text); if (foreshoreGeometryMatch.Success) { @@ -281,40 +239,392 @@ readParameters |= ParametersFoundInFile.VOORLAND; continue; } - Match memoMatch = new Regex(memoPattern).Match(text); - if (memoMatch.Success) + + if (TryReadMemo(text, data, reader)) { - data.Memo = reader.ReadToEnd(); - readParameters |= ParametersFoundInFile.MEMO; continue; } } } - var requiredParameters = new[] + + ValidateNoMissingParameters(); + + return data; + } + + /// + /// Attempts to match the given text to a VERSIE key-value pair. If a match is found, + /// the value is parsed and validated. + /// + /// The text. + /// The line number. + /// True if the text matches a VERSIE key-value pair and has been + /// validated successfully; false otherwise. + /// The value after the VERSIE key does + /// not represent a valid version code or the file version is not supported by this reader. + private bool TryReadVersion(string text, int lineNumber) + { + Match versionMatch = new Regex(versionPattern).Match(text); + if (versionMatch.Success) { - ParametersFoundInFile.VERSIE, - ParametersFoundInFile.ID, - ParametersFoundInFile.RICHTING, - ParametersFoundInFile.DAM, - ParametersFoundInFile.DAMHOOGTE, - ParametersFoundInFile.VOORLAND, - ParametersFoundInFile.DAMWAND, - ParametersFoundInFile.KRUINHOOGTE, - ParametersFoundInFile.DIJK, - ParametersFoundInFile.MEMO - }; - string[] missingParameters = requiredParameters.Where(z => !readParameters.HasFlag(z)).Select(z => z.ToString()).ToArray(); - if (missingParameters.Any()) + string readVersionText = versionMatch.Groups["version"].Value; + Version fileVersion = ParseVersion(lineNumber, readVersionText); + + if (!fileVersion.Equals(new Version(4, 0))) + { + string message = Resources.DikeProfileDataReader_TryReadVersion_Only_version_four_zero_supported; + throw CreateCriticalFileReadException(lineNumber, message); + } + + readParameters |= ParametersFoundInFile.VERSIE; + return true; + } + return false; + } + + /// + /// Parses the version code from a piece of text representing a VERSIE key-value pair. + /// + /// The line number. + /// The VERSIE key-value pair text. + /// The read version code. + /// When + /// does not represent a valid version code. + private Version ParseVersion(int lineNumber, string readVersionText) + { + try { - string criticalErrorMessage = string.Format(Resources.DikeProfileDataReader_ReadDikeProfileData_List_mising_parameters_0_, - String.Join(", ", missingParameters)); - var message = new FileReaderErrorMessageBuilder(fileBeingRead) - .Build(criticalErrorMessage); - throw new CriticalFileReadException(message); + return new Version(readVersionText); } - return data; + catch (FormatException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseVersion_Invalid_version_0_, + readVersionText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (OverflowException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseVersion_Version_0_overflows, + readVersionText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (ArgumentException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseVersion_Invalid_version_0_, + readVersionText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } } + /// + /// Attempts to match the given text to a RICHTING key-value pair. If a match is + /// found, the value is parsed and validated. If valid, the value is stored. + /// + /// The text. + /// The data to be updated. + /// The line number. + /// True if the text matches a RICHTING key-value pair and has been + /// validated successfully; false otherwise. + /// The value after the RICHTING key does + /// not represent a valid number or the orientation value is not in the range [0, 360]. + private bool TryReadOrientation(string text, DikeProfileData data, int lineNumber) + { + Match orientationMatch = new Regex(orientationPattern).Match(text); + if (orientationMatch.Success) + { + string readOrientationText = orientationMatch.Groups["orientation"].Value; + double orientation = ParseOrientation(lineNumber, readOrientationText); + + if (orientation < 0.0 || orientation > 360.0) + { + string message = string.Format(Resources.DikeProfileDataReader_TryReadOrientation_Orientation_0_must_be_in_range, + orientation); + throw CreateCriticalFileReadException(lineNumber, message); + } + data.Orientation = orientation; + readParameters |= ParametersFoundInFile.RICHTING; + return true; + } + return false; + } + + /// + /// Parses the orientation from a piece representing a RICHTING key-value pair. + /// + /// The line number. + /// The RICHTING key-value pair text. + /// The value corresponding to the RICHTING key. + /// When + /// does not represent a valid number. + private double ParseOrientation(int lineNumber, string readOrientationText) + { + try + { + return double.Parse(readOrientationText, CultureInfo.InvariantCulture); + } + catch (FormatException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseOrientation_Orientation_0_not_double, + readOrientationText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (OverflowException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseOrientation_Orientation_0_overflows, + readOrientationText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + } + + /// + /// Attempts to match the given text to a DAM key-value pair. If a match is found, + /// the value is parsed and validated. If valid, the value is stored. + /// + /// The text. + /// The data to be updated. + /// The line number. + /// True if the text matches a DAM key-value pair and has been + /// validated successfully; false otherwise. + /// The value after the DAM key does + /// not represent a valid value. + private bool TryReadDamType(string text, DikeProfileData data, int lineNumber) + { + Match damTypeMatch = new Regex(damTypePattern).Match(text); + if (damTypeMatch.Success) + { + string readDamTypeText = damTypeMatch.Groups["damtype"].Value; + DamType damType = ParseDamType(lineNumber, readDamTypeText); + + data.DamType = damType; + readParameters |= ParametersFoundInFile.DAM; + return true; + } + return false; + } + + /// + /// Parses the dam-type from a piece of text representing a DAM key-value pair. + /// + /// The line number. + /// The DAM key-value pair text. + /// The read dam-type. + /// When + /// does not represent a . + private DamType ParseDamType(int lineNumber, string readDamTypeText) + { + int damTypeValue; + try + { + damTypeValue = int.Parse(readDamTypeText, CultureInfo.InvariantCulture); + } + catch (FormatException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseDamType_DamType_0_is_not_integer, + readDamTypeText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (OverflowException e) + { + var message = string.Format(Resources.DikeProfileDataReader_ParseDamType_DamType_0_overflows, + readDamTypeText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + + if (!CanSafelyCastToEnum(damTypeValue)) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseDamType_DamType_0_must_be_in_range, + damTypeValue); + throw CreateCriticalFileReadException(lineNumber, message); + } + DamType damType = (DamType)damTypeValue; + return damType; + } + + /// + /// Attempts to match the given text to a DAMWAND key-value pair. If a match is + /// found, the value is parsed and validated. If valid, the value is stored. + /// + /// The text. + /// The data to be updated. + /// The line number. + /// True if the text matches a DAMWAND key-value pair and has been + /// validated successfully; false otherwise. + /// The value after the DAMWAND key + /// does not represent a valid value. + private bool TryReadProfileType(string text, DikeProfileData data, int lineNumber) + { + Match profileTypeMatch = new Regex(profileTypePattern).Match(text); + if (profileTypeMatch.Success) + { + string readProfileTypeText = profileTypeMatch.Groups["profiletype"].Value; + ProfileType profileType = ParseProfileType(lineNumber, readProfileTypeText); + + data.ProfileType = profileType; + readParameters |= ParametersFoundInFile.DAMWAND; + return true; + } + return false; + } + + /// + /// Parses the profile-type from a piece of text representing a DAMWAND key-value pair. + /// + /// The line number. + /// The DAMWAND key-value pair text. + /// The read profile-type. + /// When + /// does not represent a . + private ProfileType ParseProfileType(int lineNumber, string readProfileTypeText) + { + int profileTypeValue; + try + { + profileTypeValue = int.Parse(readProfileTypeText, CultureInfo.InvariantCulture); + } + catch (FormatException e) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseProfileType_ProfileType_0_not_integer, + readProfileTypeText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (OverflowException e) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseProfileType_ProfileType_0_overflows, + readProfileTypeText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + + if (!CanSafelyCastToEnum(profileTypeValue)) + { + string message = string.Format(Resources.DikeProfileDataReader_ReadDikeProfileData_ProfileType_0_must_be_in_range, + profileTypeValue); + throw CreateCriticalFileReadException(lineNumber, message); + } + return (ProfileType)profileTypeValue; + } + + /// + /// Attempts to match the given text to a DAMHOOGTE key-value pair. If a match is + /// found, the value is parsed and validated. If valid, the value is stored. + /// + /// The text. + /// The data to be updated. + /// The line number. + /// True if the text matches a DAMHOOGTE key-value pair and has been + /// validated successfully; false otherwise. + /// The value after the DAMHOOGTE key + /// does not represent a valid number. + private bool TryReadDamHeight(string text, DikeProfileData data, int lineNumber) + { + Match damHeightMatch = new Regex(damHeightPattern).Match(text); + if (damHeightMatch.Success) + { + string readDamHeightText = damHeightMatch.Groups["damheight"].Value; + var damHeight = ParseDamHeight(readDamHeightText, lineNumber); + + data.DamHeight = damHeight; + readParameters |= ParametersFoundInFile.DAMHOOGTE; + return true; + } + return false; + } + + /// + /// Parses the height of the dam from a piece of text representing a DAMHOOGTE + /// key-value pair. + /// + /// The line number. + /// The DAMHOOGTE key-value pair text. + /// The height of the dam. + /// When + /// does not represent a number. + private double ParseDamHeight(string readDamHeightText, int lineNumber) + { + try + { + return double.Parse(readDamHeightText, CultureInfo.InvariantCulture); + } + catch (FormatException e) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseDamHeight_DamHeight_0_not_number, + readDamHeightText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (OverflowException e) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseDamHeight_DamHeight_0_overflows, + readDamHeightText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + } + + /// + /// Attempts to match the given text to a KRUINHOOGTE key-value pair. If a match is + /// found, the value is parsed and validated. If valid, the value is stored. + /// + /// The text. + /// The data to be updated. + /// The line number. + /// True if the text matches a KRUINHOOGTE key-value pair and has been + /// validated successfully; false otherwise. + /// The value after the KRUINHOOGTE key + /// does not represent a valid number. + private bool TryReadCrestLevel(string text, DikeProfileData data, int lineNumber) + { + Match crestLevelMatch = new Regex(crestLevelPattern).Match(text); + if (crestLevelMatch.Success) + { + string readCrestLevelText = crestLevelMatch.Groups["crestlevel"].Value; + double crestLevel = ParseCrestLevel(lineNumber, readCrestLevelText); + + data.CrestLevel = crestLevel; + readParameters |= ParametersFoundInFile.KRUINHOOGTE; + return true; + } + return false; + } + + /// + /// Parses the height of the dike from a piece of text representing a KRUINHOOGTE + /// key-value pair. + /// + /// The line number. + /// The KRUINHOOGTE key-value pair text. + /// The height of the dike. + /// When + /// does not represent a number. + private double ParseCrestLevel(int lineNumber, string readCrestLevelText) + { + try + { + return double.Parse(readCrestLevelText, CultureInfo.InvariantCulture); + } + catch (FormatException e) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseCrestLevel_CrestLevel_0_not_number, + readCrestLevelText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + catch (OverflowException e) + { + string message = string.Format(Resources.DikeProfileDataReader_ParseCrestLevel_CrestLevel_0_overflows, + readCrestLevelText); + throw CreateCriticalFileReadException(lineNumber, message, e); + } + } + + private bool TryReadMemo(string text, DikeProfileData data, StreamReader reader) + { + Match memoMatch = new Regex(memoPattern).Match(text); + if (memoMatch.Success) + { + data.Memo = reader.ReadToEnd(); + readParameters |= ParametersFoundInFile.MEMO; + return true; + } + return false; + } + private static bool CanSafelyCastToEnum(int parameterValue) where TEnum : struct, IConvertible, IComparable, IFormattable { return Enum.GetValues(typeof(TEnum)) @@ -361,5 +671,39 @@ .Build(criticalErrorMessage); return new CriticalFileReadException(message, innerException); } + + + private void ValidateNoMissingParameters() + { + string[] missingParameters = GetMissingParameterNames(); + if (missingParameters.Any()) + { + string criticalErrorMessage = string.Format(Resources.DikeProfileDataReader_ReadDikeProfileData_List_mising_parameters_0_, + String.Join(", ", missingParameters)); + var message = new FileReaderErrorMessageBuilder(fileBeingRead) + .Build(criticalErrorMessage); + throw new CriticalFileReadException(message); + } + } + + private string[] GetMissingParameterNames() + { + var requiredParameters = new[] + { + ParametersFoundInFile.VERSIE, + ParametersFoundInFile.ID, + ParametersFoundInFile.RICHTING, + ParametersFoundInFile.DAM, + ParametersFoundInFile.DAMHOOGTE, + ParametersFoundInFile.VOORLAND, + ParametersFoundInFile.DAMWAND, + ParametersFoundInFile.KRUINHOOGTE, + ParametersFoundInFile.DIJK, + ParametersFoundInFile.MEMO + }; + return requiredParameters.Where(z => !readParameters.HasFlag(z)) + .Select(z => z.ToString()) + .ToArray(); + } } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Properties/Resources.Designer.cs =================================================================== diff -u -re71f7a8977226f7bdbc146c4e5aac1f13c39e3eb -ra27dce61d57406a3f528e8970018c9c35b8c29cf --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision e71f7a8977226f7bdbc146c4e5aac1f13c39e3eb) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -61,15 +61,123 @@ } /// + /// Looks up a localized string similar to De ingelezen kruinhoogte ({0}) is geen getal.. + /// + internal static string DikeProfileDataReader_ParseCrestLevel_CrestLevel_0_not_number { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseCrestLevel_CrestLevel_0_not_number", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen kruinhoogte ({0}) is te groot of te klein om ingelezen te worden.. + /// + internal static string DikeProfileDataReader_ParseCrestLevel_CrestLevel_0_overflows { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseCrestLevel_CrestLevel_0_overflows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen damhoogte ({0}) is geen getal.. + /// + internal static string DikeProfileDataReader_ParseDamHeight_DamHeight_0_not_number { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseDamHeight_DamHeight_0_not_number", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen damhoogte ({0}) is te groot of te klein om ingelezen te worden.. + /// + internal static string DikeProfileDataReader_ParseDamHeight_DamHeight_0_overflows { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseDamHeight_DamHeight_0_overflows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Het ingelezen dam-type ({0}) is geen geheel getal.. + /// + internal static string DikeProfileDataReader_ParseDamType_DamType_0_is_not_integer { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseDamType_DamType_0_is_not_integer", resourceCulture); + } + } + + /// /// Looks up a localized string similar to De ingelezen dam-type waarde ({0}) moet binnen het bereik [0, 3] vallen.. /// - internal static string DikeProfileDataReader_ReadDikeProfileData_DamType_0_must_be_in_range { + internal static string DikeProfileDataReader_ParseDamType_DamType_0_must_be_in_range { get { - return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_DamType_0_must_be_in_range", resourceCulture); + return ResourceManager.GetString("DikeProfileDataReader_ParseDamType_DamType_0_must_be_in_range", resourceCulture); } } /// + /// Looks up a localized string similar to Het ingelezen dam-type ({0}) is te groot of te klein om ingelezen te worden.. + /// + internal static string DikeProfileDataReader_ParseDamType_DamType_0_overflows { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseDamType_DamType_0_overflows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen orientatie ({0}) is geen getal.. + /// + internal static string DikeProfileDataReader_ParseOrientation_Orientation_0_not_double { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseOrientation_Orientation_0_not_double", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen orientatie ({0}) is te groot of te klein om ingelezen te worden.. + /// + internal static string DikeProfileDataReader_ParseOrientation_Orientation_0_overflows { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseOrientation_Orientation_0_overflows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Het ingelezen profiel-type ({0}) is geen geheel getal.. + /// + internal static string DikeProfileDataReader_ParseProfileType_ProfileType_0_not_integer { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseProfileType_ProfileType_0_not_integer", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to Het ingelezen profiel-type ({0}) is te groot of te klein om ingelezen te worden.. + /// + internal static string DikeProfileDataReader_ParseProfileType_ProfileType_0_overflows { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseProfileType_ProfileType_0_overflows", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen versie ({0}) is geen geldige versie code.. + /// + internal static string DikeProfileDataReader_ParseVersion_Invalid_version_0_ { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseVersion_Invalid_version_0_", resourceCulture); + } + } + + /// + /// Looks up a localized string similar to De ingelezen versie ({0}) bevat een versienummer die te groot is.. + /// + internal static string DikeProfileDataReader_ParseVersion_Version_0_overflows { + get { + return ResourceManager.GetString("DikeProfileDataReader_ParseVersion_Version_0_overflows", resourceCulture); + } + } + + /// /// Looks up a localized string similar to Het ingelezen aantal dijk punten ({0}) mag niet negatief zijn.. /// internal static string DikeProfileDataReader_ReadDikeProfileData_DikeCount_cannot_be_negative { @@ -97,38 +205,38 @@ } /// - /// Looks up a localized string similar to Enkel bestanden van versie '4.0' worden ondersteund.. + /// Looks up a localized string similar to De ingelezen damwand-type waarde ({0}) moet binnen het bereik [0, 2] vallen.. /// - internal static string DikeProfileDataReader_ReadDikeProfileData_Only_version_four_zero_supported { + internal static string DikeProfileDataReader_ReadDikeProfileData_ProfileType_0_must_be_in_range { get { - return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_Only_version_four_zero_supported", resourceCulture); + return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_ProfileType_0_must_be_in_range", resourceCulture); } } /// - /// Looks up a localized string similar to De ingelezen orientatie waarde ({0}) moet binnen het bereik [0, 360] vallen.. + /// Looks up a localized string similar to De ingelezen ruwheid ({0}) moet in het bereik [0, 1] vallen.. /// - internal static string DikeProfileDataReader_ReadDikeProfileData_Orientation_0_must_be_in_range { + internal static string DikeProfileDataReader_ReadDikeProfileData_Roughness_0_must_be_in_range { get { - return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_Orientation_0_must_be_in_range", resourceCulture); + return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_Roughness_0_must_be_in_range", resourceCulture); } } /// - /// Looks up a localized string similar to De ingelezen damwand-type waarde ({0}) moet binnen het bereik [0, 2] vallen.. + /// Looks up a localized string similar to De ingelezen orientatie waarde ({0}) moet binnen het bereik [0, 360] vallen.. /// - internal static string DikeProfileDataReader_ReadDikeProfileData_ProfileType_0_must_be_in_range { + internal static string DikeProfileDataReader_TryReadOrientation_Orientation_0_must_be_in_range { get { - return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_ProfileType_0_must_be_in_range", resourceCulture); + return ResourceManager.GetString("DikeProfileDataReader_TryReadOrientation_Orientation_0_must_be_in_range", resourceCulture); } } /// - /// Looks up a localized string similar to De ingelezen ruwheid ({0}) moet in het bereik [0, 1] vallen.. + /// Looks up a localized string similar to Enkel bestanden van versie '4.0' worden ondersteund.. /// - internal static string DikeProfileDataReader_ReadDikeProfileData_Roughness_0_must_be_in_range { + internal static string DikeProfileDataReader_TryReadVersion_Only_version_four_zero_supported { get { - return ResourceManager.GetString("DikeProfileDataReader_ReadDikeProfileData_Roughness_0_must_be_in_range", resourceCulture); + return ResourceManager.GetString("DikeProfileDataReader_TryReadVersion_Only_version_four_zero_supported", resourceCulture); } } Index: Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Properties/Resources.resx =================================================================== diff -u -re71f7a8977226f7bdbc146c4e5aac1f13c39e3eb -ra27dce61d57406a3f528e8970018c9c35b8c29cf --- Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Properties/Resources.resx (.../Resources.resx) (revision e71f7a8977226f7bdbc146c4e5aac1f13c39e3eb) +++ Ringtoets/GrassCoverErosionInwards/src/Ringtoets.GrassCoverErosionInwards.IO/Properties/Resources.resx (.../Resources.resx) (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -138,7 +138,7 @@ Het bestand bevat het attribuut Id met een waarde welke uit meer dan alleen letters en cijfers bestaat. - + De ingelezen dam-type waarde ({0}) moet binnen het bereik [0, 3] vallen. @@ -150,10 +150,10 @@ De volgende parameter(s) zijn niet aanwezig in het bestand: {0} - + Enkel bestanden van versie '4.0' worden ondersteund. - + De ingelezen orientatie waarde ({0}) moet binnen het bereik [0, 360] vallen. @@ -165,4 +165,40 @@ Het bestand heeft geen attribuut '{0}' welke vereist is om de locaties van de dijkprofielen in te lezen. + + De ingelezen versie ({0}) is geen geldige versie code. + + + Het ingelezen dam-type ({0}) is geen geheel getal. + + + De ingelezen orientatie ({0}) is geen getal. + + + Het ingelezen dam-type ({0}) is te groot of te klein om ingelezen te worden. + + + De ingelezen orientatie ({0}) is te groot of te klein om ingelezen te worden. + + + De ingelezen versie ({0}) bevat een versienummer die te groot is. + + + De ingelezen damhoogte ({0}) is geen getal. + + + De ingelezen damhoogte ({0}) is te groot of te klein om ingelezen te worden. + + + Het ingelezen profiel-type ({0}) is te groot of te klein om ingelezen te worden. + + + Het ingelezen profiel-type ({0}) is geen geheel getal. + + + De ingelezen kruinhoogte ({0}) is geen getal. + + + De ingelezen kruinhoogte ({0}) is te groot of te klein om ingelezen te worden. + \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/DikeProfiles/DikeProfileDataReaderTest.cs =================================================================== diff -u -r4339c599a8e0bc1265e7a07cb4d6ce3665562e76 -ra27dce61d57406a3f528e8970018c9c35b8c29cf --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/DikeProfiles/DikeProfileDataReaderTest.cs (.../DikeProfileDataReaderTest.cs) (revision 4339c599a8e0bc1265e7a07cb4d6ce3665562e76) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/DikeProfiles/DikeProfileDataReaderTest.cs (.../DikeProfileDataReaderTest.cs) (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -112,11 +112,14 @@ } [Test] - public void ReadDikeProfileData_ValidFilePath1_ReturnDikeProfileData() + [TestCase("profiel001 - Ringtoets.prfl")] + [TestCase("profiel001 - Ringtoets_WithWhiteSpaceAfterValues.prfl")] + public void ReadDikeProfileData_ValidFilePath1_ReturnDikeProfileData( + string validFileName) { // Setup string validFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, - Path.Combine("DikeProfiles", "profiel001 - Ringtoets.prfl")); + Path.Combine("DikeProfiles", validFileName)); var reader = new DikeProfileDataReader(); @@ -351,7 +354,278 @@ faultyFilePath, expectedLineNumber, expectedFaultyRoughness); Assert.AreEqual(expectedMessage, message); } - + + [Test] + [TestCase("faulty_unparsableVersie.prfl", "syudrj iowydlklk")] + [TestCase("faulty_unparsableVersie_noValue1.prfl", "")] + [TestCase("faulty_unparsableVersie_noValue2.prfl", "")] + [TestCase("faulty_unparsableVersie_IncorrectCharacter.prfl", "4.q")] + [TestCase("faulty_unparsableVersie_NegativeNumber.prfl", "-4.-0")] + public void ReadDikeProfileData_FaultyFileWithUnparsableVersion_ThrowCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 1: De ingelezen versie ({1}) is geen geldige versie code.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableVersie_Overflow.prfl", "44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444.0")] + public void ReadDikeProfileData_FaultyFileWithOverflowVersion_ThrowCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 1: De ingelezen versie ({1}) bevat een versienummer die te groot is.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableRichting.prfl", "d;apwiorqu ihk dfh")] + [TestCase("faulty_unparsableRichting_noValue1.prfl", "")] + [TestCase("faulty_unparsableRichting_noValue2.prfl", "")] + public void ReadDikeProfileData_FaultyFileWithUnparsableOrientation_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 4: De ingelezen orientatie ({1}) is geen getal.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableRichting_Overflow1.prfl", "-22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.2")] + [TestCase("faulty_unparsableRichting_Overflow2.prfl", "22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.2")] + public void ReadDikeProfileData_FaultyFileWithOverflowOrientation_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 4: De ingelezen orientatie ({1}) is te groot of te klein om ingelezen te worden.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableDam.prfl", "309845poevotiuwe985v le09b 38- 35thp9 -")] + [TestCase("faulty_unparsableDam_noValue1.prfl", "")] + [TestCase("faulty_unparsableDam_noValue2.prfl", "")] + public void ReadDikeProfileData_FaultyFileWithUnparsableDamType_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 6: Het ingelezen dam-type ({1}) is geen geheel getal.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableDam_Overflow1.prfl", "-55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555")] + [TestCase("faulty_unparsableDam_Overflow2.prfl", "22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222")] + public void ReadDikeProfileData_FaultyFileWithOverflowDamType_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 6: Het ingelezen dam-type ({1}) is te groot of te klein om ingelezen te worden.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableDamwand.prfl", "0v9 5y8w o8p 38uy-9863")] + [TestCase("faulty_unparsableDamwand_noValue1.prfl", "")] + [TestCase("faulty_unparsableDamwand_noValue2.prfl", "")] + public void ReadDikeProfileData_FaultyFileWithUnparsableProfileType_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 11: Het ingelezen profiel-type ({1}) is geen geheel getal.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableDamwand_Overflow1.prfl", "-55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555")] + [TestCase("faulty_unparsableDamwand_Overflow2.prfl", "33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333")] + public void ReadDikeProfileData_FaultyFileWithOverflowProfileType_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 11: Het ingelezen profiel-type ({1}) is te groot of te klein om ingelezen te worden.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableDamhoogte.prfl", "-0 6u498y4")] + [TestCase("faulty_unparsableDamhoogte_noValue1.prfl", "")] + [TestCase("faulty_unparsableDamhoogte_noValue2.prfl", "")] + public void ReadDikeProfileData_FaultyFileWithUnparsableDamHeight_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 7: De ingelezen damhoogte ({1}) is geen getal.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableDamhoogte_Overflow1.prfl", "-11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")] + [TestCase("faulty_unparsableDamhoogte_Overflow2.prfl", "33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333")] + public void ReadDikeProfileData_FaultyFileWithOverflowDamHeight_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 7: De ingelezen damhoogte ({1}) is te groot of te klein om ingelezen te worden.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableKruinhoogte.prfl", "- 8ykultow9yowl;i 3-9854")] + [TestCase("faulty_unparsableKruinhoogte_noValue1.prfl", "")] + [TestCase("faulty_unparsableKruinhoogte_noValue2.prfl", "")] + public void ReadDikeProfileData_FaultyFileWithUnparsableCrestLevel_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 12: De ingelezen kruinhoogte ({1}) is geen getal.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + + [Test] + [TestCase("faulty_unparsableKruinhoogte_Overflow1.prfl", "11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111")] + [TestCase("faulty_unparsableKruinhoogte_Overflow2.prfl", "-33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333")] + public void ReadDikeProfileData_FaultyFileWithOverflowCrestLevel_ThrowsCriticalFileReadException( + string faultyFileName, string expectedReadText) + { + // Setup + string faultyFilePath = TestHelper.GetTestDataPath(TestDataPath.Ringtoets.GrassCoverErosionInwards.IO, + Path.Combine("DikeProfiles", faultyFileName)); + + var reader = new DikeProfileDataReader(); + + // Call + TestDelegate call = () => reader.ReadDikeProfileData(faultyFilePath); + + // Assert + string message = Assert.Throws(call).Message; + string expectedMessage = string.Format("Fout bij het lezen van bestand '{0}' op regel 12: De ingelezen kruinhoogte ({1}) is te groot of te klein om ingelezen te worden.", + faultyFilePath, expectedReadText); + Assert.AreEqual(expectedMessage, message); + } + // TODO: DAMWAND en DAMWAND Type coverage (beide files hebben dezelfde waardes) } } \ No newline at end of file Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,26 @@ +VERSIE 4.0 +ID profiel005 + +RICHTING 330 + +DAM 309845poevotiuwe985v le09b 38- 35thp9 - +DAMHOOGTE 0.5 + +VOORLAND 3 +-150.000 -9.000 1.000 +-100.000 -6.000 1.000 +-18.000 -6.000 1.000 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 4 +-18.000 -6.000 1.000 +-2.000 -0.100 0.500 +2.000 0.100 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +dam: havendam +voorland +talud met (ruwe) berm Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_Overflow1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_Overflow1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_Overflow1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,26 @@ +VERSIE 4.0 +ID profiel005 + +RICHTING 330 + +DAM -55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 +DAMHOOGTE 0.5 + +VOORLAND 3 +-150.000 -9.000 1.000 +-100.000 -6.000 1.000 +-18.000 -6.000 1.000 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 4 +-18.000 -6.000 1.000 +-2.000 -0.100 0.500 +2.000 0.100 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +dam: havendam +voorland +talud met (ruwe) berm Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_Overflow2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_Overflow2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_Overflow2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,26 @@ +VERSIE 4.0 +ID profiel005 + +RICHTING 330 + +DAM 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222 +DAMHOOGTE 0.5 + +VOORLAND 3 +-150.000 -9.000 1.000 +-100.000 -6.000 1.000 +-18.000 -6.000 1.000 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 4 +-18.000 -6.000 1.000 +-2.000 -0.100 0.500 +2.000 0.100 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +dam: havendam +voorland +talud met (ruwe) berm Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_noValue1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_noValue1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_noValue1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,26 @@ +VERSIE 4.0 +ID profiel005 + +RICHTING 330 + +DAM +DAMHOOGTE 0.5 + +VOORLAND 3 +-150.000 -9.000 1.000 +-100.000 -6.000 1.000 +-18.000 -6.000 1.000 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 4 +-18.000 -6.000 1.000 +-2.000 -0.100 0.500 +2.000 0.100 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +dam: havendam +voorland +talud met (ruwe) berm Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_noValue2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_noValue2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDam_noValue2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,26 @@ +VERSIE 4.0 +ID profiel005 + +RICHTING 330 + +DAM +DAMHOOGTE 0.5 + +VOORLAND 3 +-150.000 -9.000 1.000 +-100.000 -6.000 1.000 +-18.000 -6.000 1.000 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 4 +-18.000 -6.000 1.000 +-2.000 -0.100 0.500 +2.000 0.100 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +dam: havendam +voorland +talud met (ruwe) berm Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE -0 6u498y4 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_Overflow1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_Overflow1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_Overflow1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE -11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_Overflow2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_Overflow2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_Overflow2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_noValue1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_noValue1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_noValue1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_noValue2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_noValue2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamhoogte_noValue2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0v9 5y8w o8p 38uy-9863 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_Overflow1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_Overflow1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_Overflow1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND -55555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_Overflow2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_Overflow2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_Overflow2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_noValue1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_noValue1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_noValue1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_noValue2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_noValue2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableDamwand_noValue2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE - 8ykultow9yowl;i 3-9854 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_Overflow1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_Overflow1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_Overflow1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_Overflow2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_Overflow2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_Overflow2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE -33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_noValue1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_noValue1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_noValue1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_noValue2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_noValue2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableKruinhoogte_noValue2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING d;apwiorqu ihk dfh + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_Overflow1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_Overflow1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_Overflow1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING -22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.2 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_Overflow2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_Overflow2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_Overflow2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 22222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222.2 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_noValue1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_noValue1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_noValue1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_noValue2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_noValue2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableRichting_noValue2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE syudrj iowydlklk +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_IncorrectCharacter.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_IncorrectCharacter.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_IncorrectCharacter.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.q +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_NegativeNumber.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_NegativeNumber.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_NegativeNumber.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE -4.-0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_Overflow.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_Overflow.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_Overflow.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_noValue1.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_noValue1.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_noValue1.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_noValue2.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_noValue2.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/faulty_unparsableVersie_noValue2.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud Index: Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/profiel001 - Ringtoets_WithWhiteSpaceAfterValues.prfl =================================================================== diff -u --- Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/profiel001 - Ringtoets_WithWhiteSpaceAfterValues.prfl (revision 0) +++ Ringtoets/GrassCoverErosionInwards/test/Ringtoets.GrassCoverErosionInwards.IO.Test/test-data/DikeProfiles/profiel001 - Ringtoets_WithWhiteSpaceAfterValues.prfl (revision a27dce61d57406a3f528e8970018c9c35b8c29cf) @@ -0,0 +1,22 @@ +VERSIE 4.0 +ID profiel001 + +RICHTING 330 + +DAM 0 +DAMHOOGTE 0 + +VOORLAND 0 + +DAMWAND 0 +KRUINHOOGTE 6 +DIJK 2 +0.000 0.000 1.000 +18.000 6.000 1.000 + +MEMO +Verkenning prfl format: +Basis: +geen dam +geen voorland +recht talud