Exemple #1
0
        public void CustomersInQueueDisplayedOnApplicationStartup()
        {
            FindCustomerAdapter        findCustomer;
            FindCustomerResultsAdapter findCustomerResults;

            authen.SetUserNameAndPassword("Tom", "Password2");
            shell = authen.OkClick();
            //Add Kari to Queue
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "Kari";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();

            //Add Mary to Queue
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "Mary";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();

            StringCollection customersInQueue = shell.GetCustomersInQueue();

            Assert.AreEqual <int>(2, customersInQueue.Count,
                                  "There should be 2 customers in the Queue on start up");
            Assert.AreEqual <string>("Kari Hensien", customersInQueue[0],
                                     "Kari Hensien should be the first person in the Queue");
            Assert.AreEqual <string>("Mary K Andersen", customersInQueue[1],
                                     "Mary K Andersen should be the second person in the Queue");
        }
        public void CustomerAddedToQueueOnQueueToServiceClick()
        {
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();

            StringCollection customersInQueue = shell.GetCustomersInQueue();

            Assert.AreEqual <int>(1, customersInQueue.Count, "There should be 1 customer in the Queue");
            Assert.AreEqual <string>("Kari Hensien", customersInQueue[0], "Kari Hensein should be added to the Queue");
        }
Exemple #3
0
        public void ServiceCustomerLinkEnabledForNonEmptyCustomerQueue()
        {
            FindCustomerAdapter        findCustomer;
            FindCustomerResultsAdapter findCustomerResults;

            authen.SetUserNameAndPassword("Tom", "Password2");
            shell = authen.OkClick();
            //Add Kari to Queue
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "Kari";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();
            Assert.IsTrue(shell.ServiceCustomerEnabled,
                          "Service Customer Link disabled when Queue is non-empty");
        }
Exemple #4
0
        public void InitializeApplication()
        {
            testHelper = new FunctionalTestHelper();
            testHelper.ReInitializeGlobalBank();

            authentication = new AuthenAdapter();
            authentication.SetUserNameAndPassword("Tom", "Password2");
            shell = authentication.OkClick();

            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "kari";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();
            rightPane       = shell.ServiceCustomer();
            customerSummary = rightPane.CustomerSummary();
        }
Exemple #5
0
        public void CheckAccountValueAfterPurchasingCD()
        {
            purchaseCD.DurationTextBox = "150";
            purchaseCD.AmountTextBox   = "100";
            purchaseCD.Purchase();
            customerSummary.ServiceCompleted();
            //check again the account combobox
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "Kari";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();
            rightPane = shell.ServiceCustomer();

            customerSummary = rightPane.CustomerSummary();
            purchaseCD      = rightPane.PurchaseCD();
            Assert.IsTrue(CheckAccountComboBoxValues(2));
        }
        public void CustomerAddedToQueueInCorrectOrder()
        {
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit1";
            addReason.OkClick();

            //Add Mary to Queue
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "Mary";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit2";
            addReason.OkClick();

            //Check sequence in the queue
            StringCollection customersInQueue = shell.GetCustomersInQueue();

            Assert.AreEqual <int>(2, customersInQueue.Count, "There should be 2 customer in the Queue");
            Assert.AreEqual <string>("Kari Hensien", customersInQueue[0], "Kari Hensein should be added to the Queue");
            Assert.AreEqual <string>("Mary K Andersen", customersInQueue[1], "Mary Andersen should be added to the Queue");
        }
Exemple #7
0
        public void CustomerBeingServicedMovedToMyCustomerQueue()
        {
            FindCustomerAdapter        findCustomer;
            FindCustomerResultsAdapter findCustomerResults;
            RightPaneAdapter           rightPane;

            authen.SetUserNameAndPassword("Tom", "Password2");
            shell = authen.OkClick();
            //Add Kari to Queue
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "Kari";
            findCustomerResults    = findCustomer.Find();
            addReason = findCustomerResults.QueueForService();
            addReason.ReasonForVisit = "Checking Account - Opening request";
            addReason.Description    = "Test Visit";
            addReason.OkClick();

            rightPane = shell.ServiceCustomer();
            shell.MyCustomerQueue();
            StringCollection myCustomers = shell.GetCustomersInMyQueue();

            Assert.AreEqual <int>(1, myCustomers.Count);
            Assert.AreEqual <string>("Kari Hensien", myCustomers[0], "Customer Name in MyQueue is not correct");
        }