public void ConstructorTest() { SetUp(); Assert.Equal(ESimulationStage.AfterInfectedCalculation, _component.SimulationStages); Assert.Equal(HOURS_PER_YEAR/DEFAULT_HOURS_PER_TICK, _component.TicksPerYear); Assert.Equal(DEFAULT_AGE_LIMIT, _component.AgeLimit); int ageLimit = RANDOM.Next(125); // |f| Just to stay realistic :D int simulationIntervall = RANDOM.Next(1, HOURS_PER_YEAR); // |f| Do not need to test outside of 1-8544 _component = new AgeingComponent(ageLimit); _component.SetSimulationIntervall(simulationIntervall); Assert.Equal(HOURS_PER_YEAR/simulationIntervall, _component.TicksPerYear); Assert.Equal(ageLimit, _component.AgeLimit); }
private void SetUp() { _component = new AgeingComponent(DEFAULT_AGE_LIMIT); _component.SetSimulationIntervall(DEFAULT_HOURS_PER_TICK); }