protected override void Context() { var pkSimConfiguration = new PKSimConfiguration(); var serializerRepository = new UnitSystemXmlSerializerRepository(); serializerRepository.PerformMapping(); sut = new DimensionRepository(new PKSimDimensionFactory(), serializerRepository, pkSimConfiguration); }
public void should_return_the_path_in_local_folder_if_the_file_does_not_exists_in_the_application_folder_and_does_not_exists_locally() { doWhilePreservingFileExists(() => { var localFile = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, CoreConstants.PK_SIM_DB_FILE); FileHelper.FileExists = s => false; sut = new PKSimConfiguration(); sut.PKSimDbPath.ShouldBeEqualTo(localFile); }); }
public void should_return_the_path_in_the_application_folder_if_the_file_exists_in_the_application_folder() { doWhilePreservingFileExists(() => { var appDataFile = Path.Combine(sut.AllUsersFolderPath, CoreConstants.PK_SIM_DB_FILE); FileHelper.FileExists = s => string.Equals(s, appDataFile); sut = new PKSimConfiguration(); sut.PKSimDbPath.ShouldBeEqualTo(appDataFile); }); }
protected override void Context() { var pkSimConfiguration = new PKSimConfiguration { DimensionFilePath = DomainHelperForSpecs.DimensionFilePath, PKParametersFilePath = DomainHelperForSpecs.PKParametersFilePath }; var serializerRepository = new UnitSystemXmlSerializerRepository(); serializerRepository.PerformMapping(); sut = new DimensionRepository(new PKSimDimensionFactory(), serializerRepository, pkSimConfiguration); }
protected override void Context() { sut = new PKSimConfiguration(); }