Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/CalculationsStateInfoTest.cs
===================================================================
diff -u -r0524b48e6113e9b7fc6fa0a0aeef537455b6b91d -r697903f9c21a62895b49426b5d0554d17793753e
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/CalculationsStateInfoTest.cs (.../CalculationsStateInfoTest.cs) (revision 0524b48e6113e9b7fc6fa0a0aeef537455b6b91d)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/CalculationsStateInfoTest.cs (.../CalculationsStateInfoTest.cs) (revision 697903f9c21a62895b49426b5d0554d17793753e)
@@ -53,7 +53,7 @@
public void Initialized_Always_ExpectedPropertiesSet()
{
// Assert
- Assert.AreEqual("\uE901", info.Symbol);
+ Assert.AreEqual("\uE902", info.Symbol);
}
[Test]
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/FailurePathsStateInfoTest.cs
===================================================================
diff -u -r0524b48e6113e9b7fc6fa0a0aeef537455b6b91d -r697903f9c21a62895b49426b5d0554d17793753e
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/FailurePathsStateInfoTest.cs (.../FailurePathsStateInfoTest.cs) (revision 0524b48e6113e9b7fc6fa0a0aeef537455b6b91d)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/FailurePathsStateInfoTest.cs (.../FailurePathsStateInfoTest.cs) (revision 697903f9c21a62895b49426b5d0554d17793753e)
@@ -53,7 +53,7 @@
public void Initialized_Always_ExpectedPropertiesSet()
{
// Assert
- Assert.AreEqual("\uE902", info.Symbol);
+ Assert.AreEqual("\uE903", info.Symbol);
}
[Test]
Index: Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/HydraulicLoadsStateInfoTest.cs
===================================================================
diff -u
--- Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/HydraulicLoadsStateInfoTest.cs (revision 0)
+++ Riskeer/Integration/test/Riskeer.Integration.Plugin.Test/StateInfos/HydraulicLoadsStateInfoTest.cs (revision 697903f9c21a62895b49426b5d0554d17793753e)
@@ -0,0 +1,101 @@
+// Copyright (C) Stichting Deltares 2021. All rights reserved.
+//
+// This file is part of Riskeer.
+//
+// Riskeer is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see .
+//
+// All names, logos, and references to "Deltares" are registered trademarks of
+// Stichting Deltares and remain full property of Stichting Deltares at all times.
+// All rights reserved.
+
+using System.Linq;
+using Core.Common.Base.Data;
+using Core.Gui.Plugin;
+using NUnit.Framework;
+using Rhino.Mocks;
+using Riskeer.Common.Data.AssessmentSection;
+using Riskeer.Integration.Data;
+using Riskeer.Integration.Forms.PresentationObjects;
+
+namespace Riskeer.Integration.Plugin.Test.StateInfos
+{
+ [TestFixture]
+ public class HydraulicLoadsStateInfoTest
+ {
+ private RiskeerPlugin plugin;
+ private StateInfo info;
+
+ [SetUp]
+ public void SetUp()
+ {
+ plugin = new RiskeerPlugin();
+ info = plugin.GetStateInfos().First(si => si.Name == "Hydraulische\r\n belastingen");
+ }
+
+ [TearDown]
+ public void TearDown()
+ {
+ plugin.Dispose();
+ }
+
+ [Test]
+ public void Initialized_Always_ExpectedPropertiesSet()
+ {
+ // Assert
+ Assert.AreEqual("\uE901", info.Symbol);
+ }
+
+ [Test]
+ public void GetRootData_RiskeerProject_ReturnsExpectedRootData()
+ {
+ // Setup
+ var assessmentSection = new AssessmentSection(AssessmentSectionComposition.Dike);
+ var project = new RiskeerProject
+ {
+ AssessmentSections =
+ {
+ assessmentSection
+ }
+ };
+
+ // Call
+ object rootData = info.GetRootData(project);
+
+ // Assert
+ Assert.IsNotNull(rootData);
+ Assert.IsInstanceOf(rootData);
+
+ var hydraulicLoadsStateRootContext = (HydraulicLoadsStateRootContext) rootData;
+ Assert.AreSame(assessmentSection, hydraulicLoadsStateRootContext.WrappedData);
+ }
+
+ [Test]
+ public void GetRootData_OtherThanRiskeerProject_ReturnsNull()
+ {
+ // Setup
+ var mockRepository = new MockRepository();
+ var project = mockRepository.StrictMock();
+
+ mockRepository.ReplayAll();
+
+ // Call
+ object rootData = info.GetRootData(project);
+
+ // Assert
+ Assert.IsNull(rootData);
+
+ mockRepository.VerifyAll();
+ }
+ }
+}
\ No newline at end of file