示例#1
0
        public IQualificationStepRunner CreateFor(IQualificationStep qualificationStep)
        {
            switch (qualificationStep)
            {
            case RunParameterIdentificationQualificationStep _:
                return(_container.Resolve <RunParameterIdentificationQualificationStepRunner>());

            case RunSimulationQualificationStep _:
                return(_container.Resolve <RunSimulationQualificationStepRunner>());
            }

            throw new ArgumentException(PKSimConstants.Error.UnableToFindAQualificationStepRunnderFor(qualificationStep.GetType().Name));
        }
        protected override async Task Context()
        {
            await base.Context();

            _step1             = A.Fake <IQualificationStep>();
            _step2             = A.Fake <IQualificationStep>();
            _qualificationPlan = new QualificationPlan {
                _step1, _step2
            }.WithName("QP");

            _qualificationStepRunner1 = A.Fake <IQualificationStepRunner>();
            _qualificationStepRunner2 = A.Fake <IQualificationStepRunner>();

            A.CallTo(() => _qualificationStepRunnerFactory.CreateFor(_step1)).Returns(_qualificationStepRunner1);
            A.CallTo(() => _qualificationStepRunnerFactory.CreateFor(_step2)).Returns(_qualificationStepRunner2);
        }
示例#3
0
        protected override Task Context()
        {
            _qualificationStepMapper = A.Fake <QualificationStepMapper>();
            _objectBaseFactory       = A.Fake <IObjectBaseFactory>();
            sut = new QualificationPlanMapper(_qualificationStepMapper, _objectBaseFactory);

            _qualificationStep = A.Fake <IQualificationStep>();
            _qualificationPlan = new QualificationPlan {
                _qualificationStep
            }.WithName("QP");
            _qualificationStepSnapshot = new QualificationStep();

            A.CallTo(() => _qualificationStepMapper.MapToSnapshot(_qualificationStep)).Returns(_qualificationStepSnapshot);

            _project = new PKSimProject();
            return(_completed);
        }
 public async Task RunAsync(IQualificationStep qualificationStep)
 {
     _logger.AddDebug(PKSimConstants.Information.StartingQualificationStep(qualificationStep.Display));
     await RunAsync(qualificationStep.DowncastTo <T>());
 }
 public QualificationStepViewVm(IQualificationStep step)
 {
     GroupName          = step.Name;
     _step              = step;
     _step.RankChanged += sender => OnPropertyChanged(() => RowList);
 }