Beispiel #1
0
        public void CustomerBeingServicedIsRemovedFromCustomerQueue()
        {
            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();
            findCustomerResults.QueueForService();

            rightPane = shell.ServiceCustomer();
            shell.CustomerQueue();

            // Customer queue is updated in the background; sleep and re-check periodically
            int totalWait = 10000;

            while (totalWait > 0)
            {
                if (shell.GetCustomersInQueue().Count == 0)
                {
                    break;
                }

                Thread.Sleep(100);
                totalWait -= 100;
            }

            Assert.AreEqual <int>(0, shell.GetCustomersInQueue().Count);
        }
Beispiel #2
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");
        }
Beispiel #3
0
 public void CanNavigateToMyCustomerQueue()
 {
     authen.SetUserNameAndPassword("Tom", "Password2");
     shell = authen.OkClick();
     shell.MyCustomerQueue();
     Assert.IsTrue(shell.MyCustomerQueueDisplayed, "My Customer Queue is not displayed");
 }
Beispiel #4
0
 public void ServiceCustomerLinkPresent()
 {
     authen.SetUserNameAndPassword("Tom", "Password2");
     shell = authen.OkClick();
     shell.CustomerQueue();
     shell.CheckForServiceCustomerLink();
 }
        public void LogIntoApplicationWhenOkClickedInLoginWindow()
        {
            authen.SetUserNameAndPassword("Jerry", "Password1");
            ShellAdapter shell = authen.OkClick();

            shell.Close();
        }
Beispiel #6
0
 public void ServiceCustomerLinkDisabledForEmptyCustomerQueue()
 {
     authen.SetUserNameAndPassword("Tom", "Password2");
     shell = authen.OkClick();
     shell.CustomerQueue();
     Assert.IsFalse(shell.ServiceCustomerEnabled,
                    "Service Customer Link enabled when Queue is empty");
 }
Beispiel #7
0
        public void CustomerQueueIsEmptyWhenCustomersNotPresentInQueue()
        {
            authen.SetUserNameAndPassword("Jerry", "Password1");
            shell = authen.OkClick();
            StringCollection customersInQueue = shell.GetCustomersInQueue();

            Assert.AreEqual <int>(0, customersInQueue.Count, "Customer Queue is not empty");
        }
Beispiel #8
0
 public void CheckStatusBarDisplaysUserNameAndRole()
 {
     authen.SetUserNameAndPassword("Tom", "Password2");
     shell = authen.OkClick();
     Assert.IsTrue(IsUserNameAndRoleDisplayed(1), "Officer Name and Role is not displayed");
     authen.SetUserNameAndPassword("Tom", "Password2");
     authen.OkClick();
     Assert.IsTrue(IsUserNameAndRoleDisplayed(2), "Greeter Name and Role is not displayed");
 }
        public void InitializeApplication()
        {
            testHelper = new FunctionalTestHelper();
            testHelper.ReInitializeGlobalBank();

            authentication = new AuthenAdapter();
            authentication.SetUserNameAndPassword("Tom", "Password2");
            shell        = authentication.OkClick();
            findCustomer = shell.FindCustomer();
        }
        public void InitializeApplication()
        {
            testHelper = new FunctionalTestHelper();
            testHelper.ReInitializeGlobalBank();

            authentication = new AuthenAdapter();
            authentication.SetUserNameAndPassword("Jerry", "Password1");
            shell = authentication.OkClick();
            addCustomerToQueue = shell.AddNewCustomerToQueue();
        }
Beispiel #11
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");
        }
Beispiel #12
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();
        }
        public void CheckCustomerSummaryDisplaysAllDetailsOfVisitor()
        {
            addCustomerToQueue.FirstName      = "Sandesh";
            addCustomerToQueue.MiddleInitial  = "P";
            addCustomerToQueue.LastName       = "Ambekar";
            addCustomerToQueue.Street         = "123, Test St.";
            addCustomerToQueue.City           = "Test City";
            addCustomerToQueue.State          = "Test State";
            addCustomerToQueue.Zip            = "123456";
            addCustomerToQueue.HomeNumber     = "1234567890";
            addCustomerToQueue.WorkNumber     = "1234567890";
            addCustomerToQueue.CellNumber     = "1234567890";
            addCustomerToQueue.SSN            = "123456789";
            addCustomerToQueue.EMail          = "SA@testmail";
            addCustomerToQueue.ReasonForVisit = "Checking Account - Opening request";
            addCustomerToQueue.Description    = "Test Visit";
            addCustomerToQueue.OkClick();

            shell.Close();
            authentication = new AuthenAdapter();
            authentication.SetUserNameAndPassword("Tom", "Password2");
            shell = authentication.OkClick();
            shell.CustomerQueue();
            rightPane       = shell.ServiceCustomer();
            customerSummary = rightPane.CustomerSummary();
            Assert.AreEqual <string>("Sandesh P Ambekar", customerSummary.Name,
                                     "Full Name does not have the correct value");
            Assert.AreEqual <string>("Checking Account - Opening request", customerSummary.ReasonCode,
                                     "Full Name does not have the correct value");
            Assert.AreEqual <string>("Test Visit", customerSummary.ReasonDescription,
                                     "Full Name does not have the correct value");
            Assert.AreEqual <string>("123 Test St., Test City, Test State 12345",
                                     customerSummary.Address, "Address does not have the correct value");
            Assert.AreEqual <string>("123456789", customerSummary.SSN,
                                     "SSN does not have the correct number");
            Assert.AreEqual <string>("1234567890", customerSummary.HomeNumber,
                                     "Home Phone does not have the correct number");
            Assert.AreEqual <string>("SA@testmail", customerSummary.Email,
                                     "Email does not have the correct value");
        }
Beispiel #14
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");
        }
Beispiel #15
0
 public void LauchBarToolStripHasCorrectNumberOfIconsForManager()
 {
     authen.SetUserNameAndPassword("Spike", "Password3");
     shell = authen.OkClick();
     Assert.AreEqual <int>(2, shell.LauchBarIconCount, "Number of Icons in LauchBar should be 2");
 }
Beispiel #16
0
 public void LauchBarToolStripHasCorrectNumberOfIconsForGreeter()
 {
     authen.SetUserNameAndPassword("Jerry", "Password1");
     shell = authen.OkClick();
     Assert.AreEqual <int>(1, shell.LauchBarIconCount, "Number of Icons in LauchBar should be 1");
 }
Beispiel #17
0
 public void CheckInitialViewofShellOnApplicationStartup()
 {
     authen.SetUserNameAndPassword("Tom", "Password2");
     shell = authen.OkClick();
     shell.CheckInitialShellView();
 }