protected override void Context() { base.Context(); _covariates = new IndividualCovariates(); _covariates.Gender = _genderRepository.Male; _covariates.Race = _populationRepository.All().First(); _covariates.AddCovariate("Key1", "Value1"); _covariates.AddCovariate("Key2", "Value2"); }
protected override void Context() { base.Context(); _originalValueCache = A.Fake <ParameterValuesCache>(); _parameterCache = A.Fake <PathCache <IParameter> >(); _cov1 = new IndividualCovariates(); _cov2 = new IndividualCovariates(); _cov3 = new IndividualCovariates(); _cov4 = new IndividualCovariates(); _cacheToMerge = A.Fake <ParameterValuesCache>(); _originalCovariates = new List <IndividualCovariates> { _cov1, _cov2 }; _covariatesToMerge = new List <IndividualCovariates> { _cov3, _cov4 }; sut = new IndividualPropertiesCache(_originalValueCache, _originalCovariates); _individualPropertiesCacheToMerge = new IndividualPropertiesCache(_cacheToMerge, _covariatesToMerge); }
protected override void Because() { _deserialized = SerializeAndDeserialize(_covariates); }