Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs
===================================================================
diff -u -r3937c582facb03372a3676b1ebf0ef158005a9ab -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 3937c582facb03372a3676b1ebf0ef158005a9ab)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.Designer.cs (.../Resources.Designer.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -94,9 +94,9 @@
///
/// Looks up a localized string similar to Het XML-document dat de configuratie voor de berekeningen beschrijft bevat geen berekeningselementen..
///
- public static string ConfigurationReader_No_calculation_items_found {
+ public static string ConfigurationReader_No_configuration_items_found {
get {
- return ResourceManager.GetString("ConfigurationReader_No_calculation_items_found", resourceCulture);
+ return ResourceManager.GetString("ConfigurationReader_No_configuration_items_found", resourceCulture);
}
}
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx
===================================================================
diff -u -r3937c582facb03372a3676b1ebf0ef158005a9ab -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 3937c582facb03372a3676b1ebf0ef158005a9ab)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Properties/Resources.resx (.../Resources.resx) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -504,7 +504,7 @@
Het XML-document dat de configuratie voor de berekeningen beschrijft is niet geldig. De validatie geeft de volgende melding op regel {0}, positie {1}: {2}
-
+
Het XML-document dat de configuratie voor de berekeningen beschrijft bevat geen berekeningselementen.
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ConfigurationReader.cs
===================================================================
diff -u -rf01270a101fcbc005cffb4ba740c3e5f318d206d -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ConfigurationReader.cs (.../ConfigurationReader.cs) (revision f01270a101fcbc005cffb4ba740c3e5f318d206d)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ConfigurationReader.cs (.../ConfigurationReader.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -37,11 +37,11 @@
{
///
/// Base class for reading a configuration from XML and creating a collection of corresponding
- /// , possibly containing one or more .
+ /// , typically containing one or more .
///
- /// The type of calculation items read from XML.
- public abstract class ConfigurationReader
- where TCalculationItem : IReadConfigurationItem
+ /// The type of calculation items read from XML.
+ public abstract class ConfigurationReader
+ where TReadCalculation : IReadConfigurationItem
{
private readonly XDocument xmlDocument;
@@ -77,15 +77,15 @@
/// A collection of read .
public IEnumerable Read()
{
- return ParseReadConfigurationItems(xmlDocument.Root?.Elements());
+ return ParseElements(xmlDocument.Root?.Elements());
}
///
/// Parses a read calculation element.
///
/// The read calculation element to parse.
- /// A parsed .
- protected abstract TCalculationItem ParseReadCalculation(XElement calculationElement);
+ /// A parsed .
+ protected abstract TReadCalculation ParseCalculationElement(XElement calculationElement);
///
/// Validates whether a file exists at the provided .
@@ -158,40 +158,40 @@
///
/// The XML document to validate.
/// The file path the XML document is loaded from.
- /// Thrown when the provided XML document does not contain calculation items.
+ /// Thrown when the provided XML document does not contain configuration items.
private static void ValidateNotEmpty(XDocument document, string xmlFilePath)
{
if (!document.Descendants()
.Any(d => d.Name == ConfigurationSchemaIdentifiers.CalculationElement
|| d.Name == ConfigurationSchemaIdentifiers.FolderElement))
{
string message = new FileReaderErrorMessageBuilder(xmlFilePath)
- .Build(Resources.ConfigurationReader_No_calculation_items_found);
+ .Build(Resources.ConfigurationReader_No_configuration_items_found);
throw new CriticalFileReadException(message);
}
}
- private IEnumerable ParseReadConfigurationItems(IEnumerable elements)
+ private IEnumerable ParseElements(IEnumerable elements)
{
foreach (XElement element in elements)
{
if (element.Name == ConfigurationSchemaIdentifiers.CalculationElement)
{
- yield return ParseReadCalculation(element);
+ yield return ParseCalculationElement(element);
}
if (element.Name == ConfigurationSchemaIdentifiers.FolderElement)
{
- yield return ParseReadCalculationGroup(element);
+ yield return ParseFolderElement(element);
}
}
}
- private ReadCalculationGroup ParseReadCalculationGroup(XElement folderElement)
+ private ReadCalculationGroup ParseFolderElement(XElement folderElement)
{
return new ReadCalculationGroup(folderElement.Attribute(ConfigurationSchemaIdentifiers.NameAttribute)?.Value,
- ParseReadConfigurationItems(folderElement.Elements()));
+ ParseElements(folderElement.Elements()));
}
}
}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Readers/IReadConfigurationItem.cs
===================================================================
diff -u -rb0021f2db39d2455a22c14bd3708ff2fc2a9e817 -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Readers/IReadConfigurationItem.cs (.../IReadConfigurationItem.cs) (revision b0021f2db39d2455a22c14bd3708ff2fc2a9e817)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Readers/IReadConfigurationItem.cs (.../IReadConfigurationItem.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -22,7 +22,7 @@
namespace Ringtoets.Common.IO.Readers
{
///
- /// Interface for configuration items that are read via .
+ /// Interface for configuration items that are read via .
///
public interface IReadConfigurationItem
{
Index: Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ReadCalculationGroup.cs
===================================================================
diff -u -rb0021f2db39d2455a22c14bd3708ff2fc2a9e817 -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ReadCalculationGroup.cs (.../ReadCalculationGroup.cs) (revision b0021f2db39d2455a22c14bd3708ff2fc2a9e817)
+++ Ringtoets/Common/src/Ringtoets.Common.IO/Readers/ReadCalculationGroup.cs (.../ReadCalculationGroup.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -24,7 +24,7 @@
namespace Ringtoets.Common.IO.Readers
{
///
- /// Class that represents a calculation group that is read via .
+ /// Class that represents a calculation group that is read via .
///
public class ReadCalculationGroup : IReadConfigurationItem
{
Index: Ringtoets/Common/test/Ringtoets.Common.IO.Test/Readers/ReadCalculationGroupTest.cs
===================================================================
diff -u -rb0021f2db39d2455a22c14bd3708ff2fc2a9e817 -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Common/test/Ringtoets.Common.IO.Test/Readers/ReadCalculationGroupTest.cs (.../ReadCalculationGroupTest.cs) (revision b0021f2db39d2455a22c14bd3708ff2fc2a9e817)
+++ Ringtoets/Common/test/Ringtoets.Common.IO.Test/Readers/ReadCalculationGroupTest.cs (.../ReadCalculationGroupTest.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -44,6 +44,7 @@
// Assert
Assert.IsInstanceOf(readCalculationGroup);
+ Assert.AreEqual("Calculation group", readCalculationGroup.Name);
Assert.AreSame(nestedItems, readCalculationGroup.Items);
}
Index: Ringtoets/Piping/src/Ringtoets.Piping.IO/Readers/PipingConfigurationReader.cs
===================================================================
diff -u -rf01270a101fcbc005cffb4ba740c3e5f318d206d -r4136a0156ea9e20e7e1aca569c5e89cbc713fed2
--- Ringtoets/Piping/src/Ringtoets.Piping.IO/Readers/PipingConfigurationReader.cs (.../PipingConfigurationReader.cs) (revision f01270a101fcbc005cffb4ba740c3e5f318d206d)
+++ Ringtoets/Piping/src/Ringtoets.Piping.IO/Readers/PipingConfigurationReader.cs (.../PipingConfigurationReader.cs) (revision 4136a0156ea9e20e7e1aca569c5e89cbc713fed2)
@@ -33,7 +33,7 @@
{
///
/// This class reads a piping configuration from XML and creates a collection of corresponding
- /// , possibly containing one or more .
+ /// , typically containing one or more .
///
internal class PipingConfigurationReader : ConfigurationReader
{
@@ -52,7 +52,7 @@
internal PipingConfigurationReader(string xmlFilePath)
: base(xmlFilePath, Resources.PipingConfigurationSchema) {}
- protected override ReadPipingCalculation ParseReadCalculation(XElement calculationElement)
+ protected override ReadPipingCalculation ParseCalculationElement(XElement calculationElement)
{
var constructionProperties = new ReadPipingCalculation.ConstructionProperties
{