Skip to content

Commit

Permalink
Fixes failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
msevestre committed May 16, 2023
1 parent 99f01da commit 305e7c1
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
using System.Collections.Generic;
using System.Linq;
using OSPSuite.Presentation.Presenters;
using PKSim.Core.Model;
using PKSim.Core.Repositories;
using PKSim.Core.Services;
using PKSim.Presentation.DTO.DiseaseStates;
using PKSim.Presentation.DTO.Mappers;
using PKSim.Presentation.DTO.Parameters;
using PKSim.Presentation.Views.DiseaseStates;

namespace PKSim.Presentation.Presenters.DiseaseStates
Expand Down
1 change: 1 addition & 0 deletions src/PKSim.UI.Starter/PKSimStarterUserInterfaceRegister.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ public override void RegisterInContainer(IContainer container)
scan.WithConvention<PKSimRegistrationConvention>();
scan.IncludeNamespaceContainingType<Views.ExpressionProfiles.CreateExpressionProfileView>();
scan.IncludeNamespaceContainingType<Views.Individuals.CreateIndividualView>();
scan.IncludeNamespaceContainingType<Views.DiseaseStates.DiseaseStateSelectionView>();
scan.IncludeNamespaceContainingType<Views.Parameters.ParameterGroupsView>();
scan.IncludeNamespaceContainingType<Views.ProteinExpression.ProteinExpressionsView>();
});
Expand Down
5 changes: 2 additions & 3 deletions tests/PKSim.UI.Tests/CustomColorArrayManagerSpecs.cs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
using System.Drawing;
using DevExpress.XtraEditors.ColorPickEditControl;
using OSPSuite.BDDHelper;
using OSPSuite.BDDHelper.Extensions;
using DevExpress.XtraEditors.ColorPickEditControl;
using OSPSuite.UI.Controls;


namespace PKSim.UI.Tests
namespace PKSim.UI
{
// this test is located here to take advantage of the dedicated UI Test project which does not exist in SBSuite.Core
public abstract class concern_for_CustomColorArrayManager : ContextSpecification<CustomColorArrayManager>
Expand Down
2 changes: 1 addition & 1 deletion tests/PKSim.UI.Tests/ExitCommandSpecs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using PKSim.Presentation.UICommands;
using PKSim.UI.UICommands;

namespace PKSim.UI.Tests
namespace PKSim.UI
{
public abstract class concern_for_ExitCommand : ContextSpecification<IExitCommand>
{
Expand Down
2 changes: 1 addition & 1 deletion tests/PKSim.UI.Tests/Helpers/ExceptionManagerForSpecs.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using OSPSuite.Utility.Exceptions;

namespace PKSim.UI.Tests.Helpers
namespace PKSim.UI.Helpers
{
public class ExceptionManagerForSpecs : IExceptionManager
{
Expand Down
11 changes: 5 additions & 6 deletions tests/PKSim.UI.Tests/JournalExportTaskSpecs.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
using OSPSuite.BDDHelper;
using OSPSuite.BDDHelper.Extensions;
using OSPSuite.Utility;
using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit;
using DevExpress.XtraRichEdit.API.Native;
using FakeItEasy;
using OSPSuite.BDDHelper;
using OSPSuite.BDDHelper.Extensions;
using OSPSuite.Core.Domain.Services;
using OSPSuite.Core.Journal;
using OSPSuite.Core.Services;
using OSPSuite.UI.Services;
using OSPSuite.Utility;


namespace PKSim.UI.Tests
namespace PKSim.UI
{
public abstract class concern_for_JournalExportTask : ContextSpecification<JournalExportTask>
{
Expand Down
8 changes: 3 additions & 5 deletions tests/PKSim.UI.Tests/PivotGridCellsToDataTableMapperSpecs.cs
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
using System;
using System.Data;
using OSPSuite.BDDHelper;
using OSPSuite.BDDHelper.Extensions;
using DevExpress.Data.PivotGrid;
using DevExpress.XtraPivotGrid;
using FakeItEasy;
using OSPSuite.Core.Extensions;
using OSPSuite.BDDHelper;
using OSPSuite.BDDHelper.Extensions;
using OSPSuite.UI.Controls;
using OSPSuite.UI.Mappers;
using OSPSuite.UI.Services;
using OSPSuite.Utility.Extensions;


namespace PKSim.UI.Tests
namespace PKSim.UI
{
public abstract class concern_for_PivotGridCellsToDataTableMapper : ContextSpecification<PivotGridCellsToDataTableMapper>
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,20 @@
using OSPSuite.UI.Views;
using OSPSuite.Utility.Container;
using PKSim.Core.Mappers;
using PKSim.Presentation.Mappers;
using PKSim.Presentation.Presenters.ExpressionProfiles;
using PKSim.Presentation.Presenters.Individuals;
using PKSim.Presentation.Services;
using PKSim.UI.Starter;

namespace PKSim.UI.UI.StarterTests
namespace PKSim.UI.StarterTests
{
public class concern_for_ApplicationStartup : StaticContextSpecification
{
protected IContainer _container;

protected override void Context()
{
SynchronizationContext.SetSynchronizationContext(new When_resolving_the_individual_presenter.TestSynchronizationContext());
SynchronizationContext.SetSynchronizationContext(new SynchronizationContext());
IoC.InitializeWith(new CastleWindsorContainer());

// To initialize the local container, the application starter will take some components from the
Expand Down Expand Up @@ -115,9 +114,5 @@ public void the_mapper_should_be_resolved()
_mapper.ShouldBeAnInstanceOf<ExpressionProfileToExpressionProfileBuildingBlockMapper>();
}
}

public class TestSynchronizationContext : SynchronizationContext
{
}
}
}

0 comments on commit 305e7c1

Please sign in to comment.