public void GetMaxAge_1SpeciesCohort() { int age = 10; SpeciesCohorts cohorts = MakeCohorts(species1, age); Assert.AreEqual(age, AgeCohortUtil.GetMaxAge(cohorts)); }
public void WhichIsOlderCohort_YOlder() { Cohort cohortX = new Cohort(species1, 20); Cohort cohortY = new Cohort(species1, 100); int result = AgeCohortUtil.WhichIsOlderCohort(cohortX, cohortY); Assert.IsTrue(result > 0); }
public void WhichIsOlderCohort_Same() { Cohort cohortX = new Cohort(species1, 200); Cohort cohortY = new Cohort(species1, cohortX.Age); int result = AgeCohortUtil.WhichIsOlderCohort(cohortX, cohortY); Assert.IsTrue(result == 0); }
public void GetMaxAge_ManySiteCohorts() { SpeciesCohorts cohorts1 = MakeCohorts(species1, 10, 20, 50, 100, 150); SpeciesCohorts cohorts2 = MakeCohorts(species2, 170, 190, 200); List <ISpeciesCohorts> list = new List <ISpeciesCohorts>(); list.Add(cohorts1); list.Add(cohorts2); SiteCohorts siteCohorts = new SiteCohorts(list); Assert.AreEqual(200, AgeCohortUtil.GetMaxAge(siteCohorts)); }
public void GetMaxAge_ManySpeciesCohorts() { SpeciesCohorts cohorts = MakeCohorts(species1, 10, 20, 50, 100, 150); Assert.AreEqual(150, AgeCohortUtil.GetMaxAge(cohorts)); }
public void GetMaxAge_NoSpeciesCohorts() { SpeciesCohorts cohorts = MakeCohorts(species1); Assert.AreEqual(0, AgeCohortUtil.GetMaxAge(cohorts)); }