Ejemplo n.º 1
0
        [TestMethod]//method
        public void Adult_Before_5_Test()
        {
            //Arrange data to test
            int    quantity     = 2;
            double actual_price = 14.5;
            string person       = "adult";
            int    time         = 0500;
            double expected     = 29.0;
            string day          = "daily"; //except tuesday??

            //Act creating the class
            Tickets Cin = new Tickets(); //initiate 'one' object of the ticket, this is object orientated design. Cinema is ONE object.

            Cin.Adult_Before_5(quantity, person, day, time);

            //Assert
            double total_price = quantity * actual_price;

            Assert.AreEqual(expected, total_price, 14.5, "Passed");
        }