Esempio n. 1
0
        public void i1_IsCustomerCorrect()
        {
            testCustObj2 = new Sales.Customer(2, "KT", "Lau", "1000200030004000", "Visa", "12/24");

            int    actual1 = testCustObj2.getMemberType();
            string actual2 = testCustObj2.getFirstName();
            string actual3 = testCustObj2.getLastName();
            string actual4 = testCustObj2.getCreditNumber();
            string actual5 = testCustObj2.getCreditType();
            string actual6 = testCustObj2.getExpiry();


            int    expected1 = 2;
            string expected2 = "KT";
            string expected3 = "Lau";
            string expected4 = "1000200030004000";
            string expected5 = "Visa";
            string expected6 = "12/24";

            //all variables AreEqual
            Assert.AreEqual(expected1, actual1, "Member type not equal");
            Assert.AreEqual(expected2, actual2, "First name not equal");
            Assert.AreEqual(expected3, actual3, "Last name type not equal");
            Assert.AreEqual(expected4, actual4, "Credit card number not equal");
            Assert.AreEqual(expected5, actual5, "Credit card type not equal");
            Assert.AreEqual(expected6, actual6, "Credit card expiry not equal");
        }
Esempio n. 2
0
        public void Init()
        {
            //Flight(int economyRows, int economySeats, int firstClassRows, int firstClassSeats)
            testFlightObj = new Sales.Flight(20, 160, 5, 20);

            //Activity(Flight theFlight)
            testActivityObj = new Sales.Activity(testFlightObj);

            //Customer(int memberType, String firstName, String lastName, String creditNumber, String creditType, String expiry)
            testCustObj  = new Sales.Customer(1, "Raja", "Arumuga", "1000200030004000", "Visa", "11/22");
            testCustObj1 = new Sales.Customer(1, "KT", "Lau", "1000200030004000", "Visa", "01/20");

            //Invoice(int priceCode, Customer theCust, int rowNum, int startSeatNum, int seatsBooked)
            testInvoiceObj  = new Sales.Invoice(0, testCustObj, 1, 1, 2);
            testInvoiceObj1 = new Sales.Invoice(0, testCustObj, 1, 1, 2);
            testInvoiceObj2 = new Sales.Invoice(1, testCustObj, 1, 1, 2);
            testInvoiceObj3 = new Sales.Invoice(1, testCustObj1, 1, 1, 2);

            //Seat(int numAvail, int code) code is priceCode
            testSeatObj = new Sales.Seat(160, 0);
        }