コード例 #1
0
        public void CalculateCoins_AddAQuarter_True()
        {
            //arrange

            //act
            CoinCal.CalculateCoins(55);

            //assert
            Assert.AreEqual(2, CoinCal.GetQuarters());
        }
コード例 #2
0
        public void GetQuarters_RetrievesQuartersFromCoins_True()
        {
            //arrange

            //act
            CoinCal.SetQuarter(5);

            //assert
            Assert.AreEqual(5, CoinCal.GetQuarters());
        }
コード例 #3
0
        public void CalculateCoins_AddCoins_True()
        {
            //arrange

            //act
            CoinCal.CalculateCoins(37);

            //assert
            Assert.AreEqual(1, CoinCal.GetQuarters());
            Assert.AreEqual(1, CoinCal.GetDimes());
            Assert.AreEqual(2, CoinCal.GetPennies());
        }