Index: Riskeer/Common/test/Riskeer.Common.Data.Test/IllustrationPoints/IllustrationPointResultTest.cs =================================================================== diff -u -r5c315c32bf6e74d2e9af5b97c961ae7f173a9e28 -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/Common/test/Riskeer.Common.Data.Test/IllustrationPoints/IllustrationPointResultTest.cs (.../IllustrationPointResultTest.cs) (revision 5c315c32bf6e74d2e9af5b97c961ae7f173a9e28) +++ Riskeer/Common/test/Riskeer.Common.Data.Test/IllustrationPoints/IllustrationPointResultTest.cs (.../IllustrationPointResultTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -46,16 +46,18 @@ { // Setup const string description = "illustration point"; + const string unit = "[-]"; var random = new Random(21); double value = random.NextDouble(); // Call - var illustrationPointResult = new IllustrationPointResult(description, "[-]", value); + var illustrationPointResult = new IllustrationPointResult(description, unit, value); // Assert Assert.IsInstanceOf(illustrationPointResult); Assert.AreEqual(description, illustrationPointResult.Description); + Assert.AreEqual(unit, illustrationPointResult.Unit); Assert.AreEqual(value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); Assert.AreEqual(5, illustrationPointResult.Value.NumberOfDecimalPlaces); Index: Riskeer/Common/test/Riskeer.Common.Data.Test/IllustrationPoints/SubMechanismIllustrationPointStochastTest.cs =================================================================== diff -u -r152fb1318408421028233c1e66c0b706dcb951a7 -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/Common/test/Riskeer.Common.Data.Test/IllustrationPoints/SubMechanismIllustrationPointStochastTest.cs (.../SubMechanismIllustrationPointStochastTest.cs) (revision 152fb1318408421028233c1e66c0b706dcb951a7) +++ Riskeer/Common/test/Riskeer.Common.Data.Test/IllustrationPoints/SubMechanismIllustrationPointStochastTest.cs (.../SubMechanismIllustrationPointStochastTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -35,18 +35,20 @@ { // Setup const string name = "Stochast name"; + const string unit = "[-]"; var random = new Random(21); double duration = random.NextDouble(); double alpha = random.NextDouble(); double realization = random.NextDouble(); // Call - var stochast = new SubMechanismIllustrationPointStochast(name, "[-]", duration, alpha, realization); + var stochast = new SubMechanismIllustrationPointStochast(name, unit, duration, alpha, realization); // Assert Assert.IsInstanceOf(stochast); Assert.AreEqual(name, stochast.Name); + Assert.AreEqual(unit, stochast.Unit); Assert.AreEqual(duration, stochast.Duration, stochast.Duration.GetAccuracy()); Assert.AreEqual(alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Index: Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/IllustrationPointNodeConverterTest.cs =================================================================== diff -u -r5c315c32bf6e74d2e9af5b97c961ae7f173a9e28 -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/IllustrationPointNodeConverterTest.cs (.../IllustrationPointNodeConverterTest.cs) (revision 5c315c32bf6e74d2e9af5b97c961ae7f173a9e28) +++ Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/IllustrationPointNodeConverterTest.cs (.../IllustrationPointNodeConverterTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -52,10 +52,10 @@ public void Convert_HydraRingIllustrationPointTreeNodeNull_ThrowsArgumentNullException() { // Call - TestDelegate test = () => IllustrationPointNodeConverter.Convert(null); + void Call() => IllustrationPointNodeConverter.Convert(null); // Assert - var exception = Assert.Throws(test); + var exception = Assert.Throws(Call); Assert.AreEqual("hydraRingIllustrationPointTreeNode", exception.ParamName); } @@ -121,6 +121,7 @@ IllustrationPointResult result = subMechanismIllustrationPointTreeNodeData.IllustrationPointResults.First(); Assert.AreEqual(hydraRingStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingStochast.Unit, stochast.Unit); Assert.AreEqual(hydraRingStochast.Duration, stochast.Duration, stochast.Duration.GetAccuracy()); Assert.AreEqual(hydraRingStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(hydraRingStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); @@ -198,12 +199,12 @@ IllustrationPointNode illustrationPointNode = null; // Call - TestDelegate call = () => illustrationPointNode = IllustrationPointNodeConverter.Convert(hydraRingIllustrationPointTreeNode); + void Call() => illustrationPointNode = IllustrationPointNodeConverter.Convert(hydraRingIllustrationPointTreeNode); // Assert Assert.IsNull(illustrationPointNode); - var exception = Assert.Throws(call); + var exception = Assert.Throws(Call); string expectedMessage = $"An illustration point containing a Hydra ring data type of {typeof(TestHydraRingIllustrationPointData)} is not supported."; Assert.AreEqual(expectedMessage, exception.Message); Index: Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/IllustrationPointResultConverterTest.cs =================================================================== diff -u -r5c315c32bf6e74d2e9af5b97c961ae7f173a9e28 -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/IllustrationPointResultConverterTest.cs (.../IllustrationPointResultConverterTest.cs) (revision 5c315c32bf6e74d2e9af5b97c961ae7f173a9e28) +++ Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/IllustrationPointResultConverterTest.cs (.../IllustrationPointResultConverterTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -35,10 +35,10 @@ public void Convert_HydraRingIllustrationPointResultNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => IllustrationPointResultConverter.Convert(null); + void Call() => IllustrationPointResultConverter.Convert(null); // Assert - string paramName = Assert.Throws(call).ParamName; + string paramName = Assert.Throws(Call).ParamName; Assert.AreEqual("hydraRingIllustrationPointResult", paramName); } @@ -56,6 +56,7 @@ // Assert Assert.AreEqual(illustrationPointResult.Description, illustrationPointResult.Description); + Assert.AreEqual(illustrationPointResult.Unit, illustrationPointResult.Unit); Assert.AreEqual(illustrationPointResult.Value, illustrationPointResult.Value, illustrationPointResult.Value.GetAccuracy()); } } Index: Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs =================================================================== diff -u -r1c6bdfd8378fb4c3988ddbecf8cd21fa4a41d36a -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs (.../StochastConverterTest.cs) (revision 1c6bdfd8378fb4c3988ddbecf8cd21fa4a41d36a) +++ Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/StochastConverterTest.cs (.../StochastConverterTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -36,10 +36,10 @@ public void Convert_HydraRingStochastNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => StochastConverter.Convert((HydraRingStochast) null); + void Call() => StochastConverter.Convert((HydraRingStochast) null); // Assert - string paramName = Assert.Throws(call).ParamName; + string paramName = Assert.Throws(Call).ParamName; Assert.AreEqual("hydraRingStochast", paramName); } @@ -67,10 +67,10 @@ public void Convert_HydraRingSubMechanismIllustrationPointStochastNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => StochastConverter.Convert(null); + void Call() => StochastConverter.Convert(null); // Assert - string paramName = Assert.Throws(call).ParamName; + string paramName = Assert.Throws(Call).ParamName; Assert.AreEqual("hydraRingSubMechanismIllustrationPointStochast", paramName); } @@ -95,6 +95,8 @@ Assert.AreEqual(hydraRingStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(duration, stochast.Duration, stochast.Duration.GetAccuracy()); Assert.AreEqual(hydraRingStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingStochast.Unit, stochast.Unit); + Assert.AreEqual(hydraRingStochast.Unit, stochast.Unit); Assert.AreEqual(hydraRingStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); } } Index: Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/SubMechanismIllustrationPointConverterTest.cs =================================================================== diff -u -r5c315c32bf6e74d2e9af5b97c961ae7f173a9e28 -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/SubMechanismIllustrationPointConverterTest.cs (.../SubMechanismIllustrationPointConverterTest.cs) (revision 5c315c32bf6e74d2e9af5b97c961ae7f173a9e28) +++ Riskeer/Common/test/Riskeer.Common.Service.Test/IllustrationPoints/SubMechanismIllustrationPointConverterTest.cs (.../SubMechanismIllustrationPointConverterTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -38,10 +38,10 @@ public void Convert_HydraRingSubMechanismIllustrationPointNull_ThrowsArgumentNullException() { // Call - TestDelegate call = () => SubMechanismIllustrationPointConverter.Convert(null); + void Call() => SubMechanismIllustrationPointConverter.Convert(null); // Assert - string paramName = Assert.Throws(call).ParamName; + string paramName = Assert.Throws(Call).ParamName; Assert.AreEqual("hydraRingSubMechanismIllustrationPoint", paramName); } @@ -87,6 +87,7 @@ Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Alpha, stochast.Alpha, stochast.Alpha.GetAccuracy()); Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Duration, stochast.Duration, stochast.Duration.GetAccuracy()); Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Name, stochast.Name); + Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Unit, stochast.Unit); Assert.AreEqual(hydraRingSubMechanismIllustrationPointStochast.Realization, stochast.Realization, stochast.Realization.GetAccuracy()); } } Index: Riskeer/HydraRing/test/Riskeer.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/IllustrationPointResultTest.cs =================================================================== diff -u -r5c315c32bf6e74d2e9af5b97c961ae7f173a9e28 -rd161a5b9260940094e6769288e3966d3a268768a --- Riskeer/HydraRing/test/Riskeer.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/IllustrationPointResultTest.cs (.../IllustrationPointResultTest.cs) (revision 5c315c32bf6e74d2e9af5b97c961ae7f173a9e28) +++ Riskeer/HydraRing/test/Riskeer.HydraRing.Calculation.Test/Data/Output/IllustrationPoints/IllustrationPointResultTest.cs (.../IllustrationPointResultTest.cs) (revision d161a5b9260940094e6769288e3966d3a268768a) @@ -44,13 +44,15 @@ { // Setup const string description = "some description"; + const string unit = "[-]"; const double value = 123; // Call - var result = new IllustrationPointResult(description, "[-]", value); + var result = new IllustrationPointResult(description, unit, value); // Assert Assert.AreEqual(description, result.Description); + Assert.AreEqual(unit, result.Unit); Assert.AreEqual(value, result.Value); } }