Exemplo n.º 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);
 }
Exemplo n.º 2
0
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     convert(passiveTransportBuildingBlock);
     _converted = true;
 }
Exemplo n.º 3
0
 protected override void Because()
 {
     base.Because();
     _ptBuildingBlock = _moBiProject.PassiveTransportCollection.FirstOrDefault();
 }
Exemplo n.º 4
0
 private void convert(IMoleculeBuilder moleculeBuilder, IMoleculeBuildingBlock moleculeBuildingBlock, IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     convert(moleculeBuilder, moleculeBuildingBlock, new[] { passiveTransportBuildingBlock });
 }
 public void Visit(IPassiveTransportBuildingBlock objToVisit)
 {
     retrieveTask(objToVisit);
 }
Exemplo n.º 6
0
 public override void GlobalContext()
 {
     base.GlobalContext();
     _passiveTransportBuildingBlock = LoadPKML <IPassiveTransportBuildingBlock>("Passive Transports");
 }
Exemplo n.º 7
0
 protected override void Because()
 {
     _passiveTransports = sut.AllPassiveTransportsFor(_simulation);
 }
Exemplo n.º 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);
        }
Exemplo n.º 9
0
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     ConvertAllParametersIn(passiveTransportBuildingBlock);
 }
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuildingBlock)
 {
     _found = passiveTransportBuildingBlock.Contains(_entity);
 }
Exemplo n.º 11
0
 public void Visit(IPassiveTransportBuildingBlock passiveTransportBuilding)
 {
     convertFormulaReferencingAeffIn(passiveTransportBuilding);
 }