Пример #1
0
        public void TestCalculateCharge()
        {
            // Arrange
            Client  person; //declare reference variable
            string  name           = "Fred";
            int     acctNo         = 1;
            string  type           = "r";
            decimal kwh            = 5;
            decimal expectedCharge = 6.26m;
            decimal actualCharge;

            //Act
            person       = new Residential(name, acctNo, type); // create account with initial balance
            actualCharge = person.CalculateBill(kwh);

            //Assert
            Assert.AreEqual(expectedCharge, actualCharge);
        }