public void TemperatureAndHumidityValidTest() { Biome testBiome = new Biome("test"); var hot = Hex.TemperatureLevel.Hot; var cold = Hex.TemperatureLevel.Cold; var arid = Hex.HumidityLevel.Arid; var humid = Hex.HumidityLevel.Humid; Assert.IsFalse(testBiome.TemperatureAndHumidityValid(hot, arid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, humid)); testBiome.AddHumidity(arid); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(hot, arid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, humid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, arid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(hot, humid)); testBiome.AddTemperature(hot); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(hot, arid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, humid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, arid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(hot, humid)); testBiome.AddHumidity(humid); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(hot, arid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, humid)); Assert.IsFalse(testBiome.TemperatureAndHumidityValid(cold, arid)); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(hot, humid)); testBiome.AddTemperature(cold); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(hot, arid)); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(cold, humid)); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(cold, arid)); Assert.IsTrue(testBiome.TemperatureAndHumidityValid(hot, humid)); }
public void AddHumidityTest() { Biome testBiome = new Biome("test"); Assert.AreEqual(0, testBiome.HumidityRange.Count); testBiome.AddHumidity(Hex.HumidityLevel.Arid); Assert.AreEqual(1, testBiome.HumidityRange.Count); Assert.IsTrue(testBiome.HumidityRange.Contains(Hex.HumidityLevel.Arid)); Assert.IsFalse(testBiome.HumidityRange.Contains(Hex.HumidityLevel.Humid)); testBiome.AddHumidity(Hex.HumidityLevel.Arid); Assert.AreEqual(1, testBiome.HumidityRange.Count); testBiome.AddHumidity(Hex.HumidityLevel.Humid); Assert.AreEqual(2, testBiome.HumidityRange.Count); Assert.IsTrue(testBiome.HumidityRange.Contains(Hex.HumidityLevel.Humid)); Assert.IsTrue(testBiome.HumidityRange.Contains(Hex.HumidityLevel.Arid)); }