public void GetRelistedTaxa()
        {
            Data.ArtDatabankenService.Factor factor;
            RedListCategoryEnum       redListCategory;
            SpeciesFactCondition      speciesFactCondition;
            SpeciesFactFieldCondition speciesFactFieldCondition;

            Data.ArtDatabankenService.TaxonList taxa;

            speciesFactCondition = new SpeciesFactCondition();
            factor = Data.ArtDatabankenService.FactorManager.GetFactor(Data.ArtDatabankenService.FactorId.RedlistCategory);
            speciesFactCondition.Factors.Add(factor);
            speciesFactCondition.IndividualCategories.Add(IndividualCategoryManager.GetDefaultIndividualCategory());
            speciesFactCondition.Periods.Add(PeriodManager.GetCurrentPublicPeriod());

            for (redListCategory = RedListCategoryEnum.DD; redListCategory <= RedListCategoryEnum.NT; redListCategory++)
            {
                speciesFactFieldCondition             = new SpeciesFactFieldCondition();
                speciesFactFieldCondition.FactorField = factor.FactorDataType.Field1;
                speciesFactFieldCondition.SetValue((Int32)redListCategory);
                speciesFactCondition.SpeciesFactFieldConditions.Add(speciesFactFieldCondition);
            }

            // The merge is necessary if there are problems in Dyntaxa.
            taxa = new Data.ArtDatabankenService.TaxonList();
            taxa.Merge(Data.ArtDatabankenService.TaxonManager.GetTaxaByQuery(speciesFactCondition, TaxonInformationType.Basic));
            Assert.IsTrue(taxa.IsNotEmpty());
            Assert.AreEqual(4261, taxa.Count);
        }
        public void GetCurrentPublicPeriod()
        {
            Data.ArtDatabankenService.Period currentPublicPeriod;

            currentPublicPeriod = PeriodManager.GetCurrentPublicPeriod();
            Assert.IsNotNull(currentPublicPeriod);
            Assert.IsFalse(currentPublicPeriod.AllowUpdate);
            Assert.AreEqual((Int32)Data.ArtDatabankenService.PeriodTypeId.SwedishRedlist, currentPublicPeriod.PeriodType.Id);
        }