Beispiel #1
0
        public void Coin010AddJarTest()
        {
            Coin010 coin010 = new Coin010();
            Jar     jar     = new Jar();

            //add the 10-cent coin to the jar
            coin010.AddToJar(jar);

            //assert jar.Coin010Counter is 1 and jar.CurrentAmount is $0.10
            Assert.AreEqual(1, jar.Coin010Counter);
            Assert.AreEqual(0.10m, jar.CurrentAmount);
        }
Beispiel #2
0
        public void FillUpwith10CentCoinTest()
        {
            Jar     jar     = new Jar();
            Coin010 coin010 = new Coin010();

            //fill up with 10-cent coins
            while (coin010.AddToJar(jar))
            {
                ;
            }

            jar.PrintJar();
        }