Exemplo n.º 1
0
 protected override void Context()
 {
     _buildingBlockTask         = A.Fake <IBuildingBlockTask>();
     _executionContext          = A.Fake <IExecutionContext>();
     _project                   = A.Fake <PKSimProject>();
     _population                = A.Fake <RandomPopulation>();
     _randomPopulationPresenter = A.Fake <ICreateRandomPopulationPresenter>();
     _applicationController     = A.Fake <IApplicationController>();
     A.CallTo(() => _applicationController.Start <ICreateRandomPopulationPresenter>()).Returns(_randomPopulationPresenter);
     A.CallTo(() => _randomPopulationPresenter.BuildingBlock).Returns(_population);
     A.CallTo(() => _buildingBlockTask.TypeFor(_population)).Returns("pop");
     A.CallTo(() => _executionContext.CurrentProject).Returns(_project);
     sut = new PopulationTask(_executionContext, _buildingBlockTask, _applicationController);
 }
Exemplo n.º 2
0
 protected override void Context()
 {
     _createIndividualPresenter = A.Fake <ICreateIndividualPresenter>();
     _buildingBlockTask         = A.Fake <IBuildingBlockTask>();
     _scaleIndividualPresenter  = A.Fake <IScaleIndividualPresenter>();
     _executionContext          = A.Fake <IExecutionContext>();
     _applicationController     = A.Fake <IApplicationController>();
     A.CallTo(() => _executionContext.CurrentProject).Returns(A.Fake <PKSimProject>());
     _individual = A.Fake <Individual>();
     A.CallTo(() => _applicationController.Start <ICreateIndividualPresenter>()).Returns(_createIndividualPresenter);
     A.CallTo(() => _applicationController.Start <IScaleIndividualPresenter>()).Returns(_scaleIndividualPresenter);
     A.CallTo(() => _createIndividualPresenter.BuildingBlock).Returns(_individual);
     A.CallTo(() => _buildingBlockTask.TypeFor(_individual)).Returns("Individual");
     sut = new IndividualTask(_executionContext, _buildingBlockTask, _applicationController);
 }