public void ExpandSpeciesFactListWithEmptySpeciesFactsFactorEmpty() { UserParameterSelection userparams = new UserParameterSelection(); userparams.Taxa.Merge(TaxonManagerTest.GetTaxaList()); Assert.IsFalse(userparams.Taxa.IsEmpty()); Data.ArtDatabankenService.SpeciesFactManager.ExpandSpeciesFactListWithEmptySpeciesFacts(userparams, new Data.ArtDatabankenService.SpeciesFactList()); }
public void Taxa() { UserParameterSelection userParameterSelection = GetUserParameterSelection(); Assert.AreEqual(userParameterSelection.Taxa.IsNotEmpty(), userParameterSelection.HasTaxa); userParameterSelection.Taxa.Merge(TaxonManagerTest.GetTaxaList()); Assert.IsTrue(userParameterSelection.Taxa.IsNotEmpty()); Assert.IsTrue(userParameterSelection.HasTaxa); }
public void ExpandSpeciesFactListWithEmptySpeciesFactsSpeciesFactsNull() { UserParameterSelection userparams = new UserParameterSelection(); userparams.Taxa.Merge(TaxonManagerTest.GetTaxaList()); Assert.AreNotEqual(0, userparams.Taxa.Count); userparams.Factors.Clear(); userparams.Factors.AddRange(GetSomeNoHeaderNoPeriodicFactors()); Assert.AreNotEqual(0, userparams.Factors.Count); Data.ArtDatabankenService.SpeciesFactList facts = null; Data.ArtDatabankenService.SpeciesFactManager.ExpandSpeciesFactListWithEmptySpeciesFacts(userparams, facts); }
// // You can use the following additional attributes as you write your tests: // // Use ClassInitialize to run code before running the first test in the class // [ClassInitialize()] // public static void MyClassInitialize(TestContext testContext) { } // // Use ClassCleanup to run code after all tests in a class have run // [ClassCleanup()] // public static void MyClassCleanup() { } // // Use TestInitialize to run code before running each test // [TestInitialize()] // public void MyTestInitialize() { } // // Use TestCleanup to run code after each test has run // [TestCleanup()] // public void MyTestCleanup() { } // #endregion private UserDataSet GetUserDataSet() { if (_userDataSet.IsNull()) { _userDataSet = new UserDataSet(); UserParameterSelection userParameterSelection = UserParameterSelectionTest.GetUserParameterSelection(); userParameterSelection.Taxa.Merge(TaxonManagerTest.GetTaxaList()); Data.ArtDatabankenService.FactorList factors = new Data.ArtDatabankenService.FactorList(); factors.Add(ArtDatabanken.Data.ArtDatabankenService.FactorManager.GetFactor(LANDSCAPE_FACTOR_ID)); userParameterSelection.Factors.Merge(factors); _userDataSet = Data.ArtDatabankenService.SpeciesFactManager.GetUserDataSetByParameterSelection(userParameterSelection); } return(_userDataSet); }
private Data.ArtDatabankenService.SpeciesObservationAreaList GetSpeciesObservationAreas(Boolean refresh) { if (_speciesObservationAreas.IsNull() || refresh) { _speciesObservationAreas = new Data.ArtDatabankenService.SpeciesObservationAreaList(); foreach (ArtDatabanken.Data.ArtDatabankenService.Taxon taxon in TaxonManagerTest.GetTaxaList()) { _speciesObservationAreas.Add(new Data.ArtDatabankenService.SpeciesObservationArea(taxon, 543, 2000, 50000, 53450000000, 5435340000000000)); } } return(_speciesObservationAreas); }
public void ExpandSpeciesFactListWithEmptySpeciesFactsUsingTwoCategories() { UserParameterSelection userparams = new UserParameterSelection(); userparams.Taxa.Merge(TaxonManagerTest.GetTaxaList()); Assert.AreNotEqual(0, userparams.Taxa.Count); userparams.Factors.Merge(GetSomeNoHeaderNoPeriodicFactors()); Assert.AreNotEqual(0, userparams.Factors.Count); // add some categories userparams.IndividualCategories.Merge(GetTwoIndividualCategories()); Assert.AreNotEqual(0, userparams.IndividualCategories.Count); Data.ArtDatabankenService.SpeciesFactList facts = new Data.ArtDatabankenService.SpeciesFactList(); Data.ArtDatabankenService.SpeciesFactManager.ExpandSpeciesFactListWithEmptySpeciesFacts(userparams, facts); //The real test Assert.AreEqual((userparams.Taxa.Count * userparams.Factors.Count * userparams.IndividualCategories.Count), facts.Count); }