using Core.Common.Base; using NUnit.Framework; using Rhino.Mocks; using Ringtoets.Common.Data.AssessmentSection; using Ringtoets.Common.Data.Calculation; using Ringtoets.Common.Forms.PresentationObjects; using Ringtoets.Piping.Data; using Ringtoets.Piping.Data.TestUtil; using Ringtoets.Piping.Forms.PresentationObjects; using Ringtoets.Piping.Primitives; namespace Ringtoets.Piping.Forms.Test.PresentationObjects { [TestFixture] public class PipingCalculationGroupContextTest { [Test] public void ParameteredConstructor_ExpectedValues() { // Setup var mocks = new MockRepository(); var assessmentSectionMock = mocks.StrictMock(); mocks.ReplayAll(); var calculationGroup = new CalculationGroup(); var surfaceLines = new[] { new RingtoetsPipingSurfaceLine() }; var soilModels = new StochasticSoilModel[] { new TestStochasticSoilModel() }; var failureMechanism = new PipingFailureMechanism(); // Call var groupContext = new PipingCalculationGroupContext(calculationGroup, surfaceLines, soilModels, failureMechanism, assessmentSectionMock); // Assert Assert.IsInstanceOf(groupContext); Assert.IsInstanceOf>(groupContext); Assert.IsInstanceOf>(groupContext); Assert.AreSame(calculationGroup, groupContext.WrappedData); Assert.AreSame(surfaceLines, groupContext.AvailablePipingSurfaceLines); Assert.AreSame(soilModels, groupContext.AvailableStochasticSoilModels); Assert.AreSame(failureMechanism, groupContext.FailureMechanism); Assert.AreSame(assessmentSectionMock, groupContext.AssessmentSection); mocks.VerifyAll(); } } }