Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PresentationObjects/WaveImpactAsphaltCoverFailureMechanismSectionResultContext.cs =================================================================== diff -u -r6c2102aae9909fdd683808a0ed66b0a8812e74cb -r43e9d6c77a1c6cb0f79e0af389128a479a46ee11 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PresentationObjects/WaveImpactAsphaltCoverFailureMechanismSectionResultContext.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultContext.cs) (revision 6c2102aae9909fdd683808a0ed66b0a8812e74cb) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/PresentationObjects/WaveImpactAsphaltCoverFailureMechanismSectionResultContext.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultContext.cs) (revision 43e9d6c77a1c6cb0f79e0af389128a479a46ee11) @@ -29,21 +29,21 @@ namespace Riskeer.WaveImpactAsphaltCover.Forms.PresentationObjects { /// - /// This class is a presentation object for a collection of + /// This class is a presentation object for a collection of /// for the . /// - public class WaveImpactAsphaltCoverFailureMechanismSectionResultContext : FailureMechanismSectionResultContext + public class WaveImpactAsphaltCoverFailureMechanismSectionResultContext : FailureMechanismSectionResultContext { /// /// Creates a new instance of . /// /// The - /// of to wrap. + /// of to wrap. /// The /// the belongs to. /// The assessment section the section results belongs to. /// Thrown when any parameter is null. - public WaveImpactAsphaltCoverFailureMechanismSectionResultContext(IObservableEnumerable wrappedSectionResults, + public WaveImpactAsphaltCoverFailureMechanismSectionResultContext(IObservableEnumerable wrappedSectionResults, IFailureMechanism failureMechanism, IAssessmentSection assessmentSection) : base(wrappedSectionResults, failureMechanism, assessmentSection) {} } Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Views/RegistrationState/WaveImpactAsphaltCoverFailureMechanismView.cs =================================================================== diff -u -r6c2102aae9909fdd683808a0ed66b0a8812e74cb -r43e9d6c77a1c6cb0f79e0af389128a479a46ee11 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Views/RegistrationState/WaveImpactAsphaltCoverFailureMechanismView.cs (.../WaveImpactAsphaltCoverFailureMechanismView.cs) (revision 6c2102aae9909fdd683808a0ed66b0a8812e74cb) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Forms/Views/RegistrationState/WaveImpactAsphaltCoverFailureMechanismView.cs (.../WaveImpactAsphaltCoverFailureMechanismView.cs) (revision 43e9d6c77a1c6cb0f79e0af389128a479a46ee11) @@ -23,6 +23,7 @@ using System.Collections.Generic; using Core.Common.Base; using Core.Components.Gis.Data; +using Riskeer.Common.Data.AssemblyTool; using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.Forms.Factories; @@ -41,7 +42,7 @@ private MapPointData sectionsStartPointMapData; private MapPointData sectionsEndPointMapData; - private NonCalculatableFailureMechanismSectionResultsMapLayer assemblyResultMapLayer; + private NonCalculatableFailureMechanismSectionResultsMapLayer assemblyResultMapLayer; private Observer failureMechanismObserver; @@ -72,8 +73,8 @@ sectionsStartPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsStartPointMapData(); sectionsEndPointMapData = RiskeerMapDataFactory.CreateFailureMechanismSectionsEndPointMapData(); - assemblyResultMapLayer = new NonCalculatableFailureMechanismSectionResultsMapLayer( - FailureMechanism, sr => WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleSection(sr, FailureMechanism, AssessmentSection).AssemblyResult); + assemblyResultMapLayer = new NonCalculatableFailureMechanismSectionResultsMapLayer( + FailureMechanism, sr => FailureMechanismSectionAssemblyResultFactory.AssembleSection(sr, AssessmentSection).AssemblyResult); sectionsMapDataCollection.Add(sectionsMapData); sectionsMapDataCollection.Add(sectionsStartPointMapData); Index: Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs =================================================================== diff -u -ra44dfc868b71b3ac991cd5536e9e8a1c62adce24 -r43e9d6c77a1c6cb0f79e0af389128a479a46ee11 --- Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision a44dfc868b71b3ac991cd5536e9e8a1c62adce24) +++ Riskeer/WaveImpactAsphaltCover/src/Riskeer.WaveImpactAsphaltCover.Plugin/WaveImpactAsphaltCoverPlugin.cs (.../WaveImpactAsphaltCoverPlugin.cs) (revision 43e9d6c77a1c6cb0f79e0af389128a479a46ee11) @@ -113,8 +113,8 @@ yield return new RiskeerViewInfo< WaveImpactAsphaltCoverFailureMechanismSectionResultContext, - IObservableEnumerable, - NonAdoptableWithProfileProbabilityFailureMechanismResultView>(() => Gui) + IObservableEnumerable, + NonAdoptableFailureMechanismResultView>(() => Gui) { GetViewName = (view, context) => RiskeerCommonFormsResources.FailureMechanism_AssessmentResult_DisplayName, CloseForData = CloseFailureMechanismResultViewForData, @@ -124,12 +124,11 @@ var failureMechanism = (WaveImpactAsphaltCoverFailureMechanism) context.FailureMechanism; IAssessmentSection assessmentSection = context.AssessmentSection; - return new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + return new NonAdoptableFailureMechanismResultView( context.WrappedData, failureMechanism, assessmentSection, - WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism, - sr => WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleSection(sr, failureMechanism, assessmentSection)); + WaveImpactAsphaltCoverFailureMechanismAssemblyFactory.AssembleFailureMechanism); } }; @@ -272,8 +271,8 @@ public override IEnumerable GetUpdateInfos() { yield return RiskeerUpdateInfoFactory.CreateFailureMechanismSectionsUpdateInfo< - WaveImpactAsphaltCoverFailureMechanismSectionsContext, WaveImpactAsphaltCoverFailureMechanism, NonAdoptableWithProfileProbabilityFailureMechanismSectionResult>( - new NonAdoptableWithProfileProbabilityFailureMechanismSectionResultUpdateStrategy()); + WaveImpactAsphaltCoverFailureMechanismSectionsContext, WaveImpactAsphaltCoverFailureMechanism, NonAdoptableFailureMechanismSectionResult>( + new NonAdoptableFailureMechanismSectionResultUpdateStrategy()); } private static FileFilterGenerator GetWaveConditionsFileFilterGenerator() @@ -294,7 +293,7 @@ } private static bool CloseFailureMechanismResultViewForData( - NonAdoptableWithProfileProbabilityFailureMechanismResultView view, object dataToCloseFor) + NonAdoptableFailureMechanismResultView view, object dataToCloseFor) { var failureMechanism = dataToCloseFor as WaveImpactAsphaltCoverFailureMechanism; Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PresentationObjects/WaveImpactAsphaltCoverFailureMechanismSectionResultContextTest.cs =================================================================== diff -u -r6c2102aae9909fdd683808a0ed66b0a8812e74cb -r43e9d6c77a1c6cb0f79e0af389128a479a46ee11 --- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PresentationObjects/WaveImpactAsphaltCoverFailureMechanismSectionResultContextTest.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultContextTest.cs) (revision 6c2102aae9909fdd683808a0ed66b0a8812e74cb) +++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Forms.Test/PresentationObjects/WaveImpactAsphaltCoverFailureMechanismSectionResultContextTest.cs (.../WaveImpactAsphaltCoverFailureMechanismSectionResultContextTest.cs) (revision 43e9d6c77a1c6cb0f79e0af389128a479a46ee11) @@ -47,7 +47,7 @@ failureMechanism.SectionResults, failureMechanism, assessmentSection); // Assert - Assert.IsInstanceOf>(context); + Assert.IsInstanceOf>(context); mocks.VerifyAll(); } } Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/ViewInfos/WaveImpactAsphaltCoverFailureMechanismResultViewInfoTest.cs =================================================================== diff -u -ra44dfc868b71b3ac991cd5536e9e8a1c62adce24 -r43e9d6c77a1c6cb0f79e0af389128a479a46ee11 --- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/ViewInfos/WaveImpactAsphaltCoverFailureMechanismResultViewInfoTest.cs (.../WaveImpactAsphaltCoverFailureMechanismResultViewInfoTest.cs) (revision a44dfc868b71b3ac991cd5536e9e8a1c62adce24) +++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/ViewInfos/WaveImpactAsphaltCoverFailureMechanismResultViewInfoTest.cs (.../WaveImpactAsphaltCoverFailureMechanismResultViewInfoTest.cs) (revision 43e9d6c77a1c6cb0f79e0af389128a479a46ee11) @@ -27,7 +27,6 @@ using NUnit.Framework; using Rhino.Mocks; using Riskeer.AssemblyTool.Data; -using Riskeer.AssemblyTool.Data.TestUtil; using Riskeer.Common.Data.AssessmentSection; using Riskeer.Common.Data.FailureMechanism; using Riskeer.Common.Forms.Views; @@ -49,7 +48,7 @@ { mocks = new MockRepository(); plugin = new WaveImpactAsphaltCoverPlugin(); - info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(NonAdoptableWithProfileProbabilityFailureMechanismResultView)); + info = plugin.GetViewInfos().First(tni => tni.ViewType == typeof(NonAdoptableFailureMechanismResultView)); } [TearDown] @@ -63,7 +62,7 @@ { // Assert Assert.AreEqual(typeof(WaveImpactAsphaltCoverFailureMechanismSectionResultContext), info.DataType); - Assert.AreEqual(typeof(IObservableEnumerable), info.ViewDataType); + Assert.AreEqual(typeof(IObservableEnumerable), info.ViewDataType); } [Test] @@ -107,10 +106,9 @@ var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -135,10 +133,9 @@ mocks.ReplayAll(); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -162,10 +159,9 @@ }); mocks.ReplayAll(); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, assessmentSection); @@ -185,10 +181,9 @@ mocks.ReplayAll(); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, failureMechanism); @@ -208,10 +203,9 @@ mocks.ReplayAll(); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, new WaveImpactAsphaltCoverFailureMechanism()); @@ -233,10 +227,9 @@ var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); var context = new WaveImpactAsphaltCoverFailureMechanismContext(failureMechanism, assessmentSection); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, context); @@ -259,10 +252,9 @@ new WaveImpactAsphaltCoverFailureMechanism(), assessmentSection); var failureMechanism = new WaveImpactAsphaltCoverFailureMechanism(); - using (var view = new NonAdoptableWithProfileProbabilityFailureMechanismResultView( + using (var view = new NonAdoptableFailureMechanismResultView( failureMechanism.SectionResults, failureMechanism, assessmentSection, - (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual), - sr => FailureMechanismSectionAssemblyResultWrapperTestFactory.Create())) + (fm, ass) => new FailureMechanismAssemblyResultWrapper(double.NaN, AssemblyMethod.Manual))) { // Call bool closeForData = info.CloseForData(view, context); @@ -291,7 +283,7 @@ IView view = info.CreateInstance(context); // Assert - Assert.IsInstanceOf>(view); + Assert.IsInstanceOf>(view); mocks.VerifyAll(); } } Index: Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs =================================================================== diff -u -r6c2102aae9909fdd683808a0ed66b0a8812e74cb -r43e9d6c77a1c6cb0f79e0af389128a479a46ee11 --- Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 6c2102aae9909fdd683808a0ed66b0a8812e74cb) +++ Riskeer/WaveImpactAsphaltCover/test/Riskeer.WaveImpactAsphaltCover.Plugin.Test/WaveImpactAsphaltCoverPluginTest.cs (.../WaveImpactAsphaltCoverPluginTest.cs) (revision 43e9d6c77a1c6cb0f79e0af389128a479a46ee11) @@ -131,8 +131,8 @@ PluginTestHelper.AssertViewInfoDefined( viewInfos, typeof(WaveImpactAsphaltCoverFailureMechanismSectionResultContext), - typeof(IObservableEnumerable), - typeof(NonAdoptableWithProfileProbabilityFailureMechanismResultView)); + typeof(IObservableEnumerable), + typeof(NonAdoptableFailureMechanismResultView)); PluginTestHelper.AssertViewInfoDefined( viewInfos,