Пример #1
0
 protected override void Context()
 {
     base.Context();
     _schema           = A.Fake <Schema>();
     _advancedProtocol = A.Fake <PKSim.Core.Model.AdvancedProtocol>();
     A.CallTo(() => _advancedProtocol.AllSchemas).Returns(new[] { _schema });
 }
 protected override void Context()
 {
     _context  = A.Fake <IExecutionContext>();
     _schema   = A.Fake <Schema>();
     _protocol = new AdvancedProtocol();
     _protocol.AddSchema(_schema);
     sut = new RemoveSchemaFromProtocolCommand(_schema, _protocol, _context);
 }
        protected override void Context()
        {
            _advancedProtocol = A.Fake <PKSim.Core.Model.AdvancedProtocol>();
            _allSchemas       = new List <Schema>();
            A.CallTo(() => _advancedProtocol.AllSchemas).Returns(_allSchemas);

            _schemaDTOMapper     = A.Fake <ISchemaToSchemaDTOMapper>();
            _schemaItemDTOMapper = A.Fake <ISchemaItemToSchemaItemDTOMapper>();
            _parameterDTOMapper  = A.Fake <IParameterToParameterDTOMapper>();
            _protocolTask        = A.Fake <IProtocolTask>();
            _parameterTask       = A.Fake <IParameterTask>();
            _view = A.Fake <IAdvancedProtocolView>();
            _dimensionRepository = A.Fake <IDimensionRepository>();
            sut = new AdvancedProtocolPresenter(_view, _schemaItemDTOMapper, _schemaDTOMapper, _parameterDTOMapper, _protocolTask, _parameterTask, _dimensionRepository);
            sut.InitializeWith(A.Fake <ICommandCollector>());
        }
Пример #4
0
 protected override void Context()
 {
     base.Context();
     _sourceProtocol = new SimpleProtocol {
         Id = "Id", Name = "Simple Protocol", Description = "tralala"
     };
     _sourceProtocol.Add(WithExtensions.WithName <IParameter>(DomainHelperForSpecs.ConstantParameterWithValue(1), "SimpleParameter"));
     _targetProtocol = new AdvancedProtocol();
     _targetProtocol.Add(WithExtensions.WithName <IParameter>(DomainHelperForSpecs.ConstantParameterWithValue(1), "AdvancedParameter"));
     _schema1 = new Schema {
         Name = "Schema1"
     };
     _schema2 = new Schema {
         Name = "Schema2"
     };
     _oldSchema = new Schema {
         Name = "_oldSchema"
     };
     _targetProtocol.AddSchema(_oldSchema);
     A.CallTo(() => _schemaMapper.MapFrom(_sourceProtocol)).Returns(new[] { _schema1, _schema2 });
 }