protected override void Initialize() { // InjectionManager.CreateObject(typeof(SpatialStructure<MyTest.Components.TargetNode>)); var spatialStructure = new SpatialStructure <TargetNode>(); #if UNITY_EDITOR AddSystem <DebugEntitiesSystem> (); #endif AddSystem <MovementPhyisicsSystem>(); AddSystem <ViewSystem>(); AddSystem <InputSystem> (); AddSystem <IABehaviourSystem> (); AddSystem <ControllerSystem> (); AddSystem <JumpSystem> (); AddSystem <LimitVelocitySystem> (); AddSystem <DelegatePhysicsSystem> (); AddSystem(new TargetSystem(spatialStructure)); AddSystem(new TargetingSystem(spatialStructure)); // now there should be the ScriptSystem or BehaviourSystem. AddSystem(new ScriptSystem()); AddSystem <LoadLevelSystem> (); }
protected override void Context() { base.Context(); _spatialStructure = new SpatialStructure(); var root = new Container { Name = _rootContainerString, Mode = ContainerMode.Physical }; root.Add(new Container { Name = _childContainerString, Mode = ContainerMode.Physical }); _spatialStructure.AddTopContainer(root); _moleculeBuildingBlock = new MoleculeBuildingBlock { Name = "MoleculeBB1" }; _moleculeBuildingBlock.Add(new MoleculeBuilder { Name = M1, DefaultStartFormula = new ConstantFormula(5.0), Dimension = DimensionFactoryForSpecs.ConcentrationDimension }); _defaultStartFormula = new ExplicitFormula("M/V"); _moleculeBuildingBlock.Add(new MoleculeBuilder { Name = M2, DefaultStartFormula = _defaultStartFormula, Dimension = DimensionFactoryForSpecs.ConcentrationDimension }); A.CallTo(() => _cloneManagerForBuildingBlock.Clone(_defaultStartFormula, A <FormulaCache> ._)).Returns(new ExplicitFormula("M/V")); }
protected override void Context() { base.Context(); _templateMoleculeStartValues = new MoleculeStartValuesBuildingBlock(); A.CallTo(_context.Context.ObjectRepository).WithReturnType <bool>().Returns(true); var moleculeBuildingBlock = new MoleculeBuildingBlock(); A.CallTo(_context.Context).WithReturnType <IMoleculeBuildingBlock>().Returns(moleculeBuildingBlock); var spatialStructure = new SpatialStructure(); A.CallTo(_context.Context).WithReturnType <ISpatialStructure>().Returns(spatialStructure); A.CallTo(() => _moleculeStartValuesCreator.CreateFrom(spatialStructure, moleculeBuildingBlock)).Returns(_templateMoleculeStartValues); _newEndogenousValue = new MoleculeStartValue { ContainerPath = new ObjectPath("Organism", AppConstants.Organs.ENDOGENOUS_IGG, "Plasma"), Name = "M", IsPresent = true }; _existingEndogenousValue = new MoleculeStartValue { ContainerPath = new ObjectPath("Organism", AppConstants.Organs.ENDOGENOUS_IGG, "Cell"), Name = "M", IsPresent = true }; _existingTemplateEndogenousValue = new MoleculeStartValue { ContainerPath = new ObjectPath("Organism", AppConstants.Organs.ENDOGENOUS_IGG, "Cell"), Name = "M", IsPresent = true }; _templateMoleculeStartValues.Add(_newEndogenousValue); _templateMoleculeStartValues.Add(_existingTemplateEndogenousValue); _moleculeStartValueBuildingBlock.Add(_existingEndogenousValue); }
public void TestComplexSpatialStructure() { SpatialStructure x1 = _buildConfiguration.SpatialStructure as SpatialStructure; Assert.IsNotNull(x1); ISpatialStructure x2 = SerializeAndDeserialize(x1); AssertForSpecs.AreEqualSpatialStructure(x2, x1); }
protected override void Context() { base.Context(); _spatialStructureBuildingBlock = new SpatialStructure { Id = "2" }; sut.AddBuildingBlock(new MoleculeStartValuesBuildingBlock { MoleculeBuildingBlockId = "1", SpatialStructureId = "1" }); sut.AddBuildingBlock(new ParameterStartValuesBuildingBlock { MoleculeBuildingBlockId = "1", SpatialStructureId = "2" }); }
protected override void Context() { base.Context(); _individualId = "_oldIndividualId"; _parmeterId = "_oldParmeterId"; _constantFormula = new ExplicitFormula().WithId("TOTO"); _container = new Container().WithId(_individualId); _spStructure = new SpatialStructure().WithId("STRUCT"); _spStructure.AddTopContainer(_container); _spStructure.AddFormula(_constantFormula); _parameter = new Parameter().WithId(_parmeterId).WithFormula(_constantFormula); _container.Add(_parameter); }
protected override void Context() { sut = new EntitiesInBuildingBlockRetriever <IParameter>(); var buildingBlock = new SpatialStructure(); var topContainer = new Container().WithName("ROOT"); _parameter1 = new Parameter().WithName("P1").WithFormula(new ConstantFormula(1)); _parameter2 = new Parameter().WithName("P2").WithFormula(new ConstantFormula(2)); topContainer.Add(_parameter1); topContainer.Add(_parameter2); buildingBlock.Add(topContainer); _buildingBlock = buildingBlock; }
protected override void Context() { _quantity = _parameter; base.Context(); var container = new Container(); container.Add(_parameter); var spatialStructure = new SpatialStructure { container }; _buildingBlockInfo.UntypedBuildingBlock = spatialStructure; }
protected override void Context() { base.Context(); var spatialStructure1 = new SpatialStructure().WithName("Tada"); var containerA = new Container().WithName("ContainerA"); var childA1 = new Container().WithName("1").WithParentContainer(containerA); var containerB = new Container().WithName("ContainerB"); spatialStructure1.Add(containerA); spatialStructure1.Add(containerB); var spatialStructure2 = new SpatialStructure().WithName("Tada"); containerA = new Container().WithName("ContainerA"); containerB = new Container().WithName("ContainerC"); spatialStructure2.Add(containerA); spatialStructure2.Add(containerB); _object1 = spatialStructure1; _object2 = spatialStructure2; }
protected override void Context() { sut = new SpatialStructure(); }