Index: Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Commands/AssessmentSectionFromFileCommandHandlerTest.cs =================================================================== diff -u -r50b203a8d5c805fc548fb6b92c70a847190da6a5 -r75c007324755a9f899f7fc5639ff873311343bdc --- Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Commands/AssessmentSectionFromFileCommandHandlerTest.cs (.../AssessmentSectionFromFileCommandHandlerTest.cs) (revision 50b203a8d5c805fc548fb6b92c70a847190da6a5) +++ Ringtoets/Integration/test/Ringtoets.Integration.Forms.Test/Commands/AssessmentSectionFromFileCommandHandlerTest.cs (.../AssessmentSectionFromFileCommandHandlerTest.cs) (revision 75c007324755a9f899f7fc5639ff873311343bdc) @@ -20,8 +20,6 @@ // All rights reserved. using System; -using System.Collections; -using System.Collections.Generic; using System.IO; using System.Linq; using System.Reflection; @@ -61,6 +59,7 @@ // Assert var paramName = Assert.Throws(call).ParamName; Assert.AreEqual("dialogParent", paramName); + mockRepository.VerifyAll(); } [Test] @@ -78,6 +77,7 @@ // Assert var paramName = Assert.Throws(call).ParamName; Assert.AreEqual("projectOwner", paramName); + mockRepository.VerifyAll(); } [Test] @@ -95,9 +95,29 @@ // Assert var paramName = Assert.Throws(call).ParamName; Assert.AreEqual("viewController", paramName); + mockRepository.VerifyAll(); } [Test] + public void Constructor_WithData_ExpectedValues() + { + // Setup + var mockRepository = new MockRepository(); + var parentDialogMock = mockRepository.StrictMock(); + var projectOwnerMock = mockRepository.StrictMock(); + var viewControllerMock = mockRepository.StrictMock(); + mockRepository.ReplayAll(); + + // Call + var assessmentSectionFromFileCommandHandler = + new AssessmentSectionFromFileCommandHandler(parentDialogMock, projectOwnerMock, viewControllerMock); + + // Assert + Assert.IsInstanceOf(assessmentSectionFromFileCommandHandler); + mockRepository.VerifyAll(); + } + + [Test] public void CreateAssessmentSectionFromFile_InvalidDirectory_LogsWarningProjectOwnerNotUpdated() { // Setup @@ -218,7 +238,7 @@ AssertAssessmentSection(TestAssessmentSection1_2(true), assessmentSection); mockRepository.VerifyAll(); } - + [Test] public void CreateAssessmentSectionFromFile_ValidDirectoryOkClickedForDuplicateAssessmentSection_SetsFirstReadAssessmentSectionWithUniqueName() { @@ -410,12 +430,13 @@ Assert.IsNotNull(assessmentSection); var expectedAssessmentSection = TestAssessmentSection1_2(true); - expectedAssessmentSection.ReferenceLine.SetGeometry(new Point2D[]{}); + expectedAssessmentSection.ReferenceLine.SetGeometry(new Point2D[] + {}); AssertAssessmentSection(expectedAssessmentSection, assessmentSection); mockRepository.VerifyAll(); } - + [Test] public void CreateAssessmentSectionFromFile_ShapeWithoutInvalidNormOkClicked_LogsAndSetsAssessmentSectionWithoutNorm() {