Index: src/Deltares.DSoilModel.Data.Tests/DSoilModelTransformerTests.cs =================================================================== diff -u -r134 -r300 --- src/Deltares.DSoilModel.Data.Tests/DSoilModelTransformerTests.cs (.../DSoilModelTransformerTests.cs) (revision 134) +++ src/Deltares.DSoilModel.Data.Tests/DSoilModelTransformerTests.cs (.../DSoilModelTransformerTests.cs) (revision 300) @@ -1,6 +1,5 @@ using System; using System.Reflection; -using System.Runtime.Serialization; using Deltares.Geotechnics; using Deltares.Probabilistic; using Deltares.Standard; @@ -36,7 +35,6 @@ return (Stochast)instance.GetType().GetMethod("FindAutoStochastProperty", BindingFlags.NonPublic | BindingFlags.Instance).Invoke(instance, new[] {obj, property}); } - [Test] [TestCase(typeof(Soil))] [TestCase(typeof(PreConsolidationStress))] public void TestFindAutoStochastProperty(Type objType) @@ -51,6 +49,13 @@ } [Test] + public void FindAutoStochastPropertyTest_ReturnsNullForUnknownProperty() + { + Assert.IsNull(FindAutoStochastProperty(new SosSoilLayer1D(), "Property")); + Assert.IsNull(FindAutoStochastProperty(new SosSoilLayer1D(), null)); + } + + [Test] [TestCase(typeof(Soil), "Cohesion")] [TestCase(typeof(Soil), "BeddingAngle")] [TestCase(typeof(PreConsolidationStress), "StressValue")] @@ -66,5 +71,13 @@ Assert.AreEqual(changedValue, deterministicProperty.GetValue(obj, null)); // deterministic property indeed changed Assert.AreNotEqual(changedValue, stochasticProperty.Mean); // but stochastic property remained its mean value } + + [Test] + public void GetTransformedValueTest_ReturnsInitialValueIfNotSupported() + { + var transformer = new DSoilModelTransformer(); + Assert.AreEqual(44, transformer.GetTransformedValue(new SosSoilLayer1D(), "Property", 44)); + Assert.AreEqual(54, transformer.SetTransformedValue(new SosSoilLayer1D(), "Property", 54)); + } } }