diff --git a/COMETwebapp.Tests/Components/Tabs/TabsPanelComponentTestFixture.cs b/COMETwebapp.Tests/Components/Tabs/TabsPanelComponentTestFixture.cs index aeb1511a..1e3b8680 100644 --- a/COMETwebapp.Tests/Components/Tabs/TabsPanelComponentTestFixture.cs +++ b/COMETwebapp.Tests/Components/Tabs/TabsPanelComponentTestFixture.cs @@ -31,6 +31,7 @@ namespace COMETwebapp.Tests.Components.Tabs using COMET.Web.Common.Model.Configuration; using COMET.Web.Common.Services.ConfigurationService; + using COMET.Web.Common.Services.SessionManagement; using COMET.Web.Common.Test.Helpers; using COMETwebapp.Components.EngineeringModel; @@ -77,11 +78,17 @@ public void SetUp() this.engineeringModelBodyViewModel = new Mock<IEngineeringModelBodyViewModel>(); this.engineeringModelBodyViewModel.Setup(x => x.OptionsTableViewModel).Returns(optionsTableViewModel.Object); + var engineeringModelSetup = new EngineeringModelSetup(); + this.iteration = new Iteration { IterationSetup = new IterationSetup { - Container = new EngineeringModelSetup() + Container = engineeringModelSetup + }, + Container = new EngineeringModel + { + EngineeringModelSetup = engineeringModelSetup } }; @@ -96,6 +103,10 @@ public void SetUp() this.viewModel.Setup(x => x.SelectedApplication).Returns(engineeringModelBodyApplication); this.viewModel.Setup(x => x.SidePanels).Returns(new SourceList<TabPanelInformation>()); + var sessionService = new Mock<ISessionService>(); + sessionService.Setup(x => x.GetDomainOfExpertise(It.IsAny<Iteration>())).Returns(new DomainOfExpertise()); + + this.context.Services.AddSingleton(sessionService.Object); this.context.Services.AddSingleton(this.viewModel.Object); this.context.Services.AddSingleton(this.engineeringModelBodyViewModel.Object); this.context.Services.AddSingleton(configuration.Object); diff --git a/COMETwebapp.Tests/Pages/TabsTestFixture.cs b/COMETwebapp.Tests/Pages/TabsTestFixture.cs index 14db8dee..e459bcd9 100644 --- a/COMETwebapp.Tests/Pages/TabsTestFixture.cs +++ b/COMETwebapp.Tests/Pages/TabsTestFixture.cs @@ -88,13 +88,18 @@ public void Setup() this.engineeringModelBodyViewModel = new Mock<IEngineeringModelBodyViewModel>(); this.engineeringModelBodyViewModel.Setup(x => x.OptionsTableViewModel).Returns(optionsTableViewModel.Object); + var engineeringSetupModel = new EngineeringModelSetup(); + this.iteration = new Iteration { IterationSetup = new IterationSetup { - Container = new EngineeringModelSetup() + Container = engineeringSetupModel }, - Container = new EngineeringModel() + Container = new EngineeringModel + { + EngineeringModelSetup = engineeringSetupModel + } }; var configuration = new Mock<IConfigurationService>();