コード例 #1
0
 protected override void Context()
 {
     base.Context();
     _project = A.Fake <IMoBiProject>();
     _objectBaseRepository      = A.Fake <IWithIdRepository>();
     _spatialStructure          = A.Fake <IMoBiSpatialStructure>();
     _simulationSettings        = A.Fake <ISimulationSettings>();
     _moBiReactionBuildingBlock = A.Fake <IMoBiReactionBuildingBlock>();
     _moleculeBuildingBlock     = A.Fake <IMoleculeBuildingBlock>();
     A.CallTo(() => _context.CurrentProject).Returns(_project);
     A.CallTo(() => _context.Create <IMoleculeBuildingBlock>()).Returns(_moleculeBuildingBlock);
     A.CallTo(() => _context.Create <IMoBiReactionBuildingBlock>()).Returns(_moBiReactionBuildingBlock);
     A.CallTo(() => _spatialStructureFactory.CreateDefault(AppConstants.DefaultNames.SpatialStructure)).Returns(_spatialStructure);
     A.CallTo(() => _simulationSettingsFactory.CreateDefault()).Returns(_simulationSettings);
     _topContainer = A.Fake <IContainer>();
     A.CallTo(() => _context.Create <IContainer>()).Returns(_topContainer);
     _passiveTransportBuildingBlock = A.Fake <IPassiveTransportBuildingBlock>();
     A.CallTo(() => _context.Create <IPassiveTransportBuildingBlock>()).Returns(_passiveTransportBuildingBlock);
     _observerBuildingBlock = A.Fake <IObserverBuildingBlock>();
     A.CallTo(() => _context.Create <IObserverBuildingBlock>()).Returns(_observerBuildingBlock);
     _eventGroupBuildingBlock = A.Fake <IEventGroupBuildingBlock>();
     A.CallTo(() => _context.Create <IEventGroupBuildingBlock>()).Returns(_eventGroupBuildingBlock);
     A.CallTo(() => _context.ObjectRepository).Returns(_objectBaseRepository);
 }
コード例 #2
0
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     convert(passiveTransportBuildingBlock);
     _converted = true;
 }
コード例 #3
0
ファイル: ReactionImporterSpecs.cs プロジェクト: Yuri05/MoBi
 protected override void Because()
 {
     base.Because();
     _ptBuildingBlock = _moBiProject.PassiveTransportCollection.FirstOrDefault();
 }
コード例 #4
0
 private void convert(IMoleculeBuilder moleculeBuilder, IMoleculeBuildingBlock moleculeBuildingBlock, IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     convert(moleculeBuilder, moleculeBuildingBlock, new[] { passiveTransportBuildingBlock });
 }
コード例 #5
0
 public void Visit(IPassiveTransportBuildingBlock objToVisit)
 {
     retrieveTask(objToVisit);
 }
コード例 #6
0
 public override void GlobalContext()
 {
     base.GlobalContext();
     _passiveTransportBuildingBlock = LoadPKML <IPassiveTransportBuildingBlock>("Passive Transports");
 }
コード例 #7
0
 protected override void Because()
 {
     _passiveTransports = sut.AllPassiveTransportsFor(_simulation);
 }
コード例 #8
0
        protected override void Context()
        {
            base.Context();
            _returnedBuildingBlocks = new List <IBuildingBlock>();
            _childReactionBuilder   = new ReactionBuilder().WithName("Test").WithId("FindME");
            _reactionBuildingBlock  = new MoBiReactionBuildingBlock()
            {
                _childReactionBuilder
            };
            _allBuildingBlocks.Add(_reactionBuildingBlock);
            _moleculeBuilder       = new MoleculeBuilder();
            _moleculeBuildingBlock = new MoleculeBuildingBlock()
            {
                _moleculeBuilder
            };
            _allBuildingBlocks.Add(_moleculeBuildingBlock);
            _obseverBuilder        = new ObserverBuilder();
            _observerBuildingBlock = new ObserverBuildingBlock()
            {
                _obseverBuilder
            };
            _allBuildingBlocks.Add(_observerBuildingBlock);
            _passiveTranportBuilder       = new TransportBuilder();
            _passiveTranportBuildingBlock = new PassiveTransportBuildingBlock()
            {
                _passiveTranportBuilder
            };
            _allBuildingBlocks.Add(_passiveTranportBuildingBlock);
            _applicationBuilder      = new ApplicationBuilder();
            _eventGroupBuildingBlock = new EventGroupBuildingBlock()
            {
                _applicationBuilder
            };
            _allBuildingBlocks.Add(_eventGroupBuildingBlock);
            _parameter = new Parameter().WithName("Para");
            var container = new Container().WithName("Cont");

            container.Add(_parameter);
            _objectBaseFactory = A.Fake <IObjectBaseFactory>();
            _parmaeterFactory  = A.Fake <IParameterFactory>();
            A.CallTo(() => _objectBaseFactory.Create <IContainer>()).Returns(A.Fake <IContainer>());
            A.CallTo(() => _objectBaseFactory.Create <IMoBiSpatialStructure>()).Returns(new MoBiSpatialStructure());
            var diagramManagerFactory = A.Fake <IDiagramManagerFactory>();

            _spatialStructure = new MoBiSpatialStructureFactory(_objectBaseFactory, _parmaeterFactory, A.Fake <IconRepository>(), diagramManagerFactory).Create().DowncastTo <IMoBiSpatialStructure>();
            _spatialStructure.AddTopContainer(container);
            _allBuildingBlocks.Add(_spatialStructure);
            _formula = new ExplicitFormula();
            _moleculeBuildingBlock.AddFormula(_formula);
            _parameterStartValue = new ParameterStartValue {
                Path = new ObjectPath {
                    "test"
                }, StartValue = 1, Dimension = A.Fake <IDimension>()
            };
            _parameterStartValueBuildingBlock = new ParameterStartValuesBuildingBlock()
            {
                _parameterStartValue
            };
            _allBuildingBlocks.Add(_parameterStartValueBuildingBlock);
            _moleculeStartValue = new MoleculeStartValue {
                ContainerPath = new ObjectPath {
                    "test"
                }, Name = "drug"
            };
            _moleculeStartValuesBuildingBlock = new MoleculeStartValuesBuildingBlock()
            {
                _moleculeStartValue
            };
            _allBuildingBlocks.Add(_moleculeStartValuesBuildingBlock);
        }
コード例 #9
0
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     ConvertAllParametersIn(passiveTransportBuildingBlock);
 }
コード例 #10
0
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     _found = passiveTransportBuildingBlock.Contains(_entity);
 }
コード例 #11
0
ファイル: Converter341To351.cs プロジェクト: onwhenrdy/MoBi
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuilding)
 {
     convertFormulaReferencingAeffIn(passiveTransportBuilding);
 }