Skip to content

Commit

Permalink
Fixes #2643 when to show global pk analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
msevestre committed May 27, 2023
1 parent d1523df commit e79adfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,23 +45,20 @@ public class GlobalPKAnalysisPresenter : AbstractSubPresenter<IGlobalPKAnalysisV
private GlobalPKAnalysisDTO _globalPKAnalysisDTO;
private DefaultPresentationSettings _settings;
private readonly IPresentationSettingsTask _presentationSettingsTask;
private readonly IProtocolToSchemaItemsMapper _protocolToSchemaItemsMapper;

public GlobalPKAnalysisPresenter(
IGlobalPKAnalysisView view,
IPKAnalysesTask pkAnalysesTask,
IGlobalPKAnalysisToGlobalPKAnalysisDTOMapper globalPKAnalysisDTOMapper,
IHeavyWorkManager heavyWorkManager,
IRepresentationInfoRepository representationInfoRepository,
IPresentationSettingsTask presentationSettingsTask,
IProtocolToSchemaItemsMapper protocolToSchemaItemsMapper) : base(view)
IPresentationSettingsTask presentationSettingsTask) : base(view)
{
_pkAnalysesTask = pkAnalysesTask;
_globalPKAnalysisDTOMapper = globalPKAnalysisDTOMapper;
_heavyWorkManager = heavyWorkManager;
_representationInfoRepository = representationInfoRepository;
_presentationSettingsTask = presentationSettingsTask;
_protocolToSchemaItemsMapper = protocolToSchemaItemsMapper;
_settings = new DefaultPresentationSettings();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ public abstract class concern_for_GlobalPKAnalysisPresenter : ContextSpecificati
protected string _compoundName;
protected List<Simulation> _simulations;
protected GlobalPKAnalysis _globalPKAnalysis;
protected IProtocolToSchemaItemsMapper _protocolToSchemaItemsMapper;

protected override void Context()
{
Expand All @@ -41,9 +40,8 @@ protected override void Context()
var heavyWorkManager = A.Fake<IHeavyWorkManager>();
var representationInfoRepository = A.Fake<IRepresentationInfoRepository>();
_presenterSettingsTask = A.Fake<IPresentationSettingsTask>();
_protocolToSchemaItemsMapper = A.Fake<IProtocolToSchemaItemsMapper>();

sut = new GlobalPKAnalysisPresenter(_view, _pKAnalysesTask, globalPKAnalysisDTOMapper, heavyWorkManager, representationInfoRepository, _presenterSettingsTask, _protocolToSchemaItemsMapper);
sut = new GlobalPKAnalysisPresenter(_view, _pKAnalysesTask, globalPKAnalysisDTOMapper, heavyWorkManager, representationInfoRepository, _presenterSettingsTask);

_simulations = new List<Simulation>();
_compoundName = "DRUG";
Expand Down Expand Up @@ -157,7 +155,6 @@ protected override void Context()
base.Context();
//no protocol for the first compound
_firstCompoundProperties.ProtocolProperties.Protocol = null;
A.CallTo(() => _protocolToSchemaItemsMapper.MapFrom(null)).Throws<Exception>();
}

protected override bool ResultForFirstProtocol() => false;
Expand Down

0 comments on commit e79adfd

Please sign in to comment.