Ejemplo n.º 1
0
 protected override void Context()
 {
     base.Context();
     _seed       = 20;
     _originData = new OriginData
     {
         Species    = A.Fake <Species>().WithName("toto"),
         Population = A.Fake <SpeciesPopulation>(),
         Weight     = new OriginDataParameter()
     };
     _individual = new Individual();
     _diseaseStateImplementation = A.Fake <IDiseaseStateImplementation>();
     A.CallTo(() => _entityBaseFactory.Create <Individual>()).Returns(_individual);
     A.CallTo(() => _diseaseStateImplementationRepository.CreateFor(_individual)).Returns(_diseaseStateImplementation);
 }
Ejemplo n.º 2
0
 protected override void Context()
 {
     base.Context();
     _originData = new OriginData
     {
         Age        = new OriginDataParameter(5),
         Species    = A.Fake <Species>().WithName("toto"),
         Population = A.Fake <SpeciesPopulation>(),
         Weight     = new OriginDataParameter()
     };
     _individual                 = new Individual();
     _validationResult           = new ValidationResult();
     _diseaseStateImplementation = A.Fake <IDiseaseStateImplementation>();
     A.CallTo(() => _diseaseStateImplementation.Validate(_originData)).Throws <OSPSuiteException>();
     A.CallTo(() => _entityBaseFactory.Create <Individual>()).Returns(_individual);
     A.CallTo(() => _entityValidator.Validate(_individual)).Returns(_validationResult);
     A.CallTo(() => _diseaseStateImplementationRepository.CreateFor(_individual)).Returns(_diseaseStateImplementation);
 }