Exemple #1
0
 public void ForecastMessage_IsChanceOfRain(int seed, double expectedChance)
 {
     Rnd.Reset(seed);
     var expectedMessage = String.Format("There is a {0:p0} chance of light rain, and the weather is cooler today", expectedChance);
     var rain = new Rain();
     Assert.AreEqual(expectedMessage, rain.ForecastMessage);
 }
Exemple #2
0
 public void Modify_MultipliesByOneMinusChanceOfRain(int seed, int expectedValue)
 {
     Rnd.Reset(seed);
     var rain = new Rain();
     Assert.AreEqual(expectedValue, rain.Modify(100, new Choices()));
 }