예제 #1
0
        public void Coin005AddJarTest()
        {
            Coin005 coin005 = new Coin005();
            Jar     jar     = new Jar();

            //add the 5-cent coin to the jar
            coin005.AddToJar(jar);

            //assert jar.Coin005Counter is 1 and jar.CurrentAmount is $0.05
            Assert.AreEqual(1, jar.Coin005Counter);
            Assert.AreEqual(0.05m, jar.CurrentAmount);
        }
        public void FillUpwith5CentCoinTest()
        {
            Jar     jar     = new Jar();
            Coin005 coin005 = new Coin005();

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

            jar.PrintJar();
        }