Fisheye: Tag 26cc2bad8e2cd204826e1b6295a341e9aaf212f8 refers to a dead (removed) revision in file `Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/FailureMechanismAssemblyFactory.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/FailureMechanismAssemblyResultFactory.cs
===================================================================
diff -u
--- Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/FailureMechanismAssemblyResultFactory.cs (revision 0)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/AssemblyTool/FailureMechanismAssemblyResultFactory.cs (revision 26cc2bad8e2cd204826e1b6295a341e9aaf212f8)
@@ -0,0 +1,49 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets 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 Ringtoets.AssemblyTool.Data;
+
+namespace Ringtoets.Common.Data.AssemblyTool
+{
+ ///
+ /// Factory for creating results of a failure mechanism assembly.
+ ///
+ public static class FailureMechanismAssemblyResultFactory
+ {
+ ///
+ /// Creates an instance of which
+ /// represents a not applicable result.
+ ///
+ public static FailureMechanismAssembly CreateNotApplicableAssembly()
+ {
+ return new FailureMechanismAssembly(double.NaN, FailureMechanismAssemblyCategoryGroup.NotApplicable);
+ }
+
+ ///
+ /// Creates an instance of which
+ /// represents a not applicable result.
+ ///
+ public static FailureMechanismAssemblyCategoryGroup CreateNotApplicableCategory()
+ {
+ return FailureMechanismAssemblyCategoryGroup.NotApplicable;
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj
===================================================================
diff -u -r3514dda97fee1a5e5178020b2a06780840075e82 -r26cc2bad8e2cd204826e1b6295a341e9aaf212f8
--- Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 3514dda97fee1a5e5178020b2a06780840075e82)
+++ Ringtoets/Common/src/Ringtoets.Common.Data/Ringtoets.Common.Data.csproj (.../Ringtoets.Common.Data.csproj) (revision 26cc2bad8e2cd204826e1b6295a341e9aaf212f8)
@@ -16,7 +16,7 @@
-
+
Fisheye: Tag 26cc2bad8e2cd204826e1b6295a341e9aaf212f8 refers to a dead (removed) revision in file `Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyFactoryTest.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyResultFactoryTest.cs
===================================================================
diff -u
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyResultFactoryTest.cs (revision 0)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/AssemblyTool/FailureMechanismAssemblyResultFactoryTest.cs (revision 26cc2bad8e2cd204826e1b6295a341e9aaf212f8)
@@ -0,0 +1,52 @@
+// Copyright (C) Stichting Deltares 2017. All rights reserved.
+//
+// This file is part of Ringtoets.
+//
+// Ringtoets 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 NUnit.Framework;
+using Ringtoets.AssemblyTool.Data;
+using Ringtoets.Common.Data.AssemblyTool;
+
+namespace Ringtoets.Common.Data.Test.AssemblyTool
+{
+ [TestFixture]
+ public class FailureMechanismAssemblyResultFactoryTest
+ {
+ [Test]
+ public void CreateNotApplicableAssembly_Always_ReturnsExpectedFailureMechanismAssembly()
+ {
+ // Call
+ FailureMechanismAssembly assembly = FailureMechanismAssemblyResultFactory.CreateNotApplicableAssembly();
+
+ // Assert
+ Assert.IsNaN(assembly.Probability);
+ Assert.AreEqual(FailureMechanismAssemblyCategoryGroup.NotApplicable, assembly.Group);
+ }
+
+ [Test]
+ public void CreateNotApplicableCategory_Always_ReturnsExpectedFailureMechanismAssembly()
+ {
+ // Call
+ FailureMechanismAssemblyCategoryGroup category = FailureMechanismAssemblyResultFactory.CreateNotApplicableCategory();
+
+ // Assert
+ Assert.AreEqual(FailureMechanismAssemblyCategoryGroup.NotApplicable, category);
+ }
+ }
+}
\ No newline at end of file
Index: Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj
===================================================================
diff -u -r3514dda97fee1a5e5178020b2a06780840075e82 -r26cc2bad8e2cd204826e1b6295a341e9aaf212f8
--- Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 3514dda97fee1a5e5178020b2a06780840075e82)
+++ Ringtoets/Common/test/Ringtoets.Common.Data.Test/Ringtoets.Common.Data.Test.csproj (.../Ringtoets.Common.Data.Test.csproj) (revision 26cc2bad8e2cd204826e1b6295a341e9aaf212f8)
@@ -20,7 +20,7 @@
-
+