Fisheye: Tag 440823566a76510b1cf515b4637740a42fc39470 refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/AssessmentSectionAssemblyCreator.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/AssessmentSectionAssemblyInputCreator.cs =================================================================== diff -u -rd8ba4886ef6d89e57d34a612fa21cd61d656f550 -r440823566a76510b1cf515b4637740a42fc39470 --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/AssessmentSectionAssemblyInputCreator.cs (.../AssessmentSectionAssemblyInputCreator.cs) (revision d8ba4886ef6d89e57d34a612fa21cd61d656f550) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Creators/AssessmentSectionAssemblyInputCreator.cs (.../AssessmentSectionAssemblyInputCreator.cs) (revision 440823566a76510b1cf515b4637740a42fc39470) @@ -114,72 +114,5 @@ throw new NotSupportedException(); } } - - /// - /// Creates based on the given parameters. - /// - /// The assembly to create a for. - /// The created . - /// Thrown when is null. - /// Thrown when contains - /// an invalid . - /// Thrown when contains - /// a valid but unsupported . - public static AssessmentSectionAssemblyResult CreateAssessementSectionAssemblyResult(AssessmentSectionAssembly input) - { - if (input == null) - { - throw new ArgumentNullException(nameof(input)); - } - - return new AssessmentSectionAssemblyResult(ConvertAssessmentSectionAssemblyCategoryGroup(input.Group), - input.Probability); - } - - /// - /// Creates based on the given parameters. - /// - /// The assembly to create a for. - /// The created . - /// Thrown when contains - /// an invalid . - /// Thrown when contains - /// a valid but unsupported . - public static AssessmentSectionAssemblyResult CreateAssessementSectionAssemblyResult(AssessmentSectionAssemblyCategoryGroup input) - { - return new AssessmentSectionAssemblyResult(ConvertAssessmentSectionAssemblyCategoryGroup(input)); - } - - private static EAssessmentGrade ConvertAssessmentSectionAssemblyCategoryGroup(AssessmentSectionAssemblyCategoryGroup input) - { - if (!Enum.IsDefined(typeof(AssessmentSectionAssemblyCategoryGroup), input)) - { - throw new InvalidEnumArgumentException(nameof(input), - (int) input, - typeof(AssessmentSectionAssemblyCategoryGroup)); - } - - switch (input) - { - case AssessmentSectionAssemblyCategoryGroup.None: - return EAssessmentGrade.Gr; - case AssessmentSectionAssemblyCategoryGroup.NotApplicable: - return EAssessmentGrade.Nvt; - case AssessmentSectionAssemblyCategoryGroup.NotAssessed: - return EAssessmentGrade.Ngo; - case AssessmentSectionAssemblyCategoryGroup.APlus: - return EAssessmentGrade.APlus; - case AssessmentSectionAssemblyCategoryGroup.A: - return EAssessmentGrade.A; - case AssessmentSectionAssemblyCategoryGroup.B: - return EAssessmentGrade.B; - case AssessmentSectionAssemblyCategoryGroup.C: - return EAssessmentGrade.C; - case AssessmentSectionAssemblyCategoryGroup.D: - return EAssessmentGrade.D; - default: - throw new NotSupportedException(); - } - } } } \ No newline at end of file Index: Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Ringtoets.AssemblyTool.KernelWrapper.csproj =================================================================== diff -u -rd55ef762fda182aedb3d0c86ed17d2405abb55db -r440823566a76510b1cf515b4637740a42fc39470 --- Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Ringtoets.AssemblyTool.KernelWrapper.csproj (.../Ringtoets.AssemblyTool.KernelWrapper.csproj) (revision d55ef762fda182aedb3d0c86ed17d2405abb55db) +++ Ringtoets/AssemblyTool/src/Ringtoets.AssemblyTool.KernelWrapper/Ringtoets.AssemblyTool.KernelWrapper.csproj (.../Ringtoets.AssemblyTool.KernelWrapper.csproj) (revision 440823566a76510b1cf515b4637740a42fc39470) @@ -30,7 +30,6 @@ - Fisheye: Tag 440823566a76510b1cf515b4637740a42fc39470 refers to a dead (removed) revision in file `Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyCreatorTest.cs'. Fisheye: No comparison available. Pass `N' to diff? Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyInputCreatorTest.cs =================================================================== diff -u -rd8ba4886ef6d89e57d34a612fa21cd61d656f550 -r440823566a76510b1cf515b4637740a42fc39470 --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyInputCreatorTest.cs (.../AssessmentSectionAssemblyInputCreatorTest.cs) (revision d8ba4886ef6d89e57d34a612fa21cd61d656f550) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Creators/AssessmentSectionAssemblyInputCreatorTest.cs (.../AssessmentSectionAssemblyInputCreatorTest.cs) (revision 440823566a76510b1cf515b4637740a42fc39470) @@ -157,74 +157,5 @@ // Assert Assert.AreEqual(expectedGroup, result); } - - [Test] - public void CreateAssessementSectionAssemblyResult_WithAssessmentSectionAssemblyAndInvalidEnumInput_ThrowsArgumentNullException() - { - // Call - TestDelegate call = () => AssessmentSectionAssemblyInputCreator.CreateAssessementSectionAssemblyResult(null); - - // Assert - var exception = Assert.Throws(call); - Assert.AreEqual("input", exception.ParamName); - } - - [Test] - public void CreateAssessementSectionAssemblyResult_WithAssessmentSectionAssemblyAndInvalidEnumInput_ThrowsInvalidEnumArgumentException() - { - // Setup - var random = new Random(21); - var input = new AssessmentSectionAssembly(random.NextDouble(), (AssessmentSectionAssemblyCategoryGroup) 99); - - // Call - TestDelegate test = () => AssessmentSectionAssemblyInputCreator.CreateAssessementSectionAssemblyResult(input); - - // Assert - const string expectedMessage = "The value of argument 'input' (99) is invalid for Enum type 'AssessmentSectionAssemblyCategoryGroup'."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); - } - - [Test] - [TestCaseSource(nameof(GetAssessmentSectionAssemblyCategoryGroupConversions))] - public void CreateAssessementSectionAssemblyResult_WithValidAssessmentSectionAssembly_ThrowsInvalidEnumArgumentException( - AssessmentSectionAssemblyCategoryGroup originalGroup, - EAssessmentGrade expectedGroup) - { - // Setup - var random = new Random(21); - var input = new AssessmentSectionAssembly(random.NextDouble(), originalGroup); - - // Call - AssessmentSectionAssemblyResult result = AssessmentSectionAssemblyInputCreator.CreateAssessementSectionAssemblyResult(input); - - // Assert - Assert.AreEqual(expectedGroup, result.Category); - Assert.AreEqual(input.Probability, result.FailureProbability); - } - - [Test] - public void CreateAssessementSectionAssemblyResult_WithInvalidEnumInput_ThrowsInvalidEnumArgumentException() - { - // Call - TestDelegate test = () => AssessmentSectionAssemblyInputCreator.CreateAssessementSectionAssemblyResult((AssessmentSectionAssemblyCategoryGroup) 99); - - // Assert - const string expectedMessage = "The value of argument 'input' (99) is invalid for Enum type 'AssessmentSectionAssemblyCategoryGroup'."; - TestHelper.AssertThrowsArgumentExceptionAndTestMessage(test, expectedMessage); - } - - [Test] - [TestCaseSource(nameof(GetAssessmentSectionAssemblyCategoryGroupConversions))] - public void CreateAssessementSectionAssemblyResult_WithValidEnumInput_ThrowsInvalidEnumArgumentException( - AssessmentSectionAssemblyCategoryGroup originalGroup, - EAssessmentGrade expectedGroup) - { - // Call - AssessmentSectionAssemblyResult result = AssessmentSectionAssemblyInputCreator.CreateAssessementSectionAssemblyResult(originalGroup); - - // Assert - Assert.AreEqual(expectedGroup, result.Category); - Assert.IsNaN(result.FailureProbability); - } } } \ No newline at end of file Index: Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Ringtoets.AssemblyTool.KernelWrapper.Test.csproj =================================================================== diff -u -rd55ef762fda182aedb3d0c86ed17d2405abb55db -r440823566a76510b1cf515b4637740a42fc39470 --- Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Ringtoets.AssemblyTool.KernelWrapper.Test.csproj (.../Ringtoets.AssemblyTool.KernelWrapper.Test.csproj) (revision d55ef762fda182aedb3d0c86ed17d2405abb55db) +++ Ringtoets/AssemblyTool/test/Ringtoets.AssemblyTool.KernelWrapper.Test/Ringtoets.AssemblyTool.KernelWrapper.Test.csproj (.../Ringtoets.AssemblyTool.KernelWrapper.Test.csproj) (revision 440823566a76510b1cf515b4637740a42fc39470) @@ -32,7 +32,6 @@ -