Пример #1
0
        public void ChargesReporterTest()
        {
            GardenManager target        = new GardenManager(); // TODO: Initialize to an appropriate value
            Garden        currentGarden = new Garden(10, 20, "Bob");

            currentGarden.AddCharge(123.45);
            currentGarden.AddCharge(678.90);
            string expected = "Bob           :   $802.35";
            string actual;

            actual = target.ChargesReporter(currentGarden);
            Assert.AreEqual(expected, actual);
        }
Пример #2
0
        public void GetAccountBalanceTest()
        {
            double gardenWidth  = 0F;
            double gardenHeight = 0F;
            string ownerName    = "Bob";
            Garden target       = new Garden(gardenWidth, gardenHeight, ownerName);

            target.AddCharge(15);
            target.AddCharge(5.5);
            target.AddCharge(10.25);

            double expected = 30.75;
            double actual;

            actual = target.GetAccountBalance();
            Assert.AreEqual(expected, actual);
        }