public void Coin050AddJarTest() { Coin050 coin050 = new Coin050(); Jar jar = new Jar(); //add the 50-cent coin to the jar coin050.AddToJar(jar); //assert jar.Coin050Counter is 1 and jar.CurrentAmount is $0.50 Assert.AreEqual(1, jar.Coin050Counter); Assert.AreEqual(0.50m, jar.CurrentAmount); }
public void FillUpwith50CentCoinTest() { Jar jar = new Jar(); Coin050 coin050 = new Coin050(); //fill up with 50-cent coins while (coin050.AddToJar(jar)) { ; } jar.PrintJar(); }