Beispiel #1
0
        public void NonWoodyPercentage()
        {
            const ushort age     = 100;
            const ushort biomass = 500;
            CohortData   data    = new CohortData(age, biomass);
            Cohort       cohort  = new Cohort(betualle, data);

            Percentage nonWoodyPercentage = Percentage.Parse("35%");

            mockCalculator.NonWoodyPercentage = nonWoodyPercentage;
            ushort expectedNonWoody = (ushort)(biomass * nonWoodyPercentage);

            ushort nonWoody = cohort.ComputeNonWoodyBiomass(activeSite);

            Assert.AreEqual(expectedNonWoody, nonWoody);
        }
        public void Init()
        {
            betualle = Data.Species["betualle"];

            const ushort age     = 100;
            const ushort biomass = 500;
            CohortData   data    = new CohortData(age, biomass);

            myCohort = new Cohort(betualle, data);

            bool[,] grid = new bool[, ] {
                { true }
            };
            DataGrid <bool> dataGrid  = new DataGrid <bool>(grid);
            ILandscape      landscape = new Landscape.Landscape(dataGrid);

            myActiveSite = landscape[1, 1];
        }