public static Data.ArtDatabankenService.SpeciesObservationSearchCriteria GetOneSearchCriteria() { Data.ArtDatabankenService.SpeciesObservationSearchCriteria searchCriteria; searchCriteria = new Data.ArtDatabankenService.SpeciesObservationSearchCriteria(); searchCriteria.TaxonIds = TaxonManagerTest.GetSomeTaxonIds(1); searchCriteria.Accuracy = 1000; return(searchCriteria); }
public void GetSpeciesObservationsIncludeUncertainTaxonDetermination() { Data.ArtDatabankenService.SpeciesObservationSearchCriteria searchCriteria; SpeciesObservationInformation speciesObservationInformation1, speciesObservationInformation2; TestInitialize("PrintObs"); searchCriteria = new Data.ArtDatabankenService.SpeciesObservationSearchCriteria(); searchCriteria.IncludeUncertainTaxonDetermination = false; searchCriteria.TaxonIds = new List <Int32>(); searchCriteria.TaxonIds.Add(5740); // Gul fingersvamp searchCriteria.UserRoleId = Data.ArtDatabankenService.UserManager.GetUser().Roles[0].Id; speciesObservationInformation1 = Data.ArtDatabankenService.SpeciesObservationManager.GetSpeciesObservations(searchCriteria); Assert.IsNotNull(speciesObservationInformation1); Assert.IsTrue(speciesObservationInformation1.SpeciesObservations.IsNotEmpty()); searchCriteria.IncludeUncertainTaxonDetermination = true; speciesObservationInformation2 = Data.ArtDatabankenService.SpeciesObservationManager.GetSpeciesObservations(searchCriteria); Assert.IsNotNull(speciesObservationInformation2); Assert.IsTrue(speciesObservationInformation2.SpeciesObservations.IsNotEmpty()); Assert.IsTrue(speciesObservationInformation2.SpeciesObservations.Count > speciesObservationInformation1.SpeciesObservations.Count); }