public void SearchResultsDisplayedOnFindClick()
        {
            findCustomer.FirstName = "Kari";
            findCustomerResult     = findCustomer.Find();

            Assert.IsNotNull(findCustomerResult, "Find Customer Results Screen is not displayed");
        }
        public void EscKeyMappedToCancelButton()
        {
            findCustomer.LastName = "Abishek";
            findCustomer.EscPressed();

            findCustomerResult = new FindCustomerResultsAdapter();
            Assert.IsNull(findCustomerResult, "Find Customer Results Screen is displayed");
        }
        public void SearchResultsNotDisplayedOnCancelClick()
        {
            findCustomer.LastName = "Mathew";
            findCustomer.Cancel();

            findCustomerResult = new FindCustomerResultsAdapter();
            Assert.IsNull(findCustomerResult, "Find Customer Results Screen is displayed");
        }
Beispiel #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();
        }
        public void ExactSearchBasedOnWorkNumber()
        {
            findCustomer.WorkNumber = "2222222222";
            findCustomerResult      = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record with WorkPhone as 222-222-2222");
            Assert.AreEqual <string>("Leonids", result[0].FirstName,
                                     "The first record in the list should be 'Leonids Paturskis'");
            Assert.AreEqual <string>("Paturskis", result[0].LastName,
                                     "The first record in the list should be 'Leonids Paturskis'");
        }
        public void ExactSearchBasedOnHomeNumber()
        {
            findCustomer.HomeNumber = "4444444444";
            findCustomerResult      = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record with HomePhone as 4444444444");
            Assert.AreEqual <string>("Kari", result[0].FirstName,
                                     "The first record should have First Name as 'Kari'");
            Assert.AreEqual <string>("Hensien", result[0].LastName,
                                     "The first record should have Last Name as 'Hensien'");
        }
        public void ExactSearchBasedOnCity()
        {
            findCustomer.City  = "Bellevue";
            findCustomerResult = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record with City as 'Bellevue'");
            Assert.AreEqual <string>("Kari", result[0].FirstName,
                                     "The third record in the list should be 'Kari Hensien'");
            Assert.AreEqual <string>("Hensien", result[0].LastName,
                                     "The third record in the list should be 'Kari Hensien'");
        }
        public void StartWithSearchBasedOnLastName()
        {
            findCustomer.LastName = "a";
            findCustomerResult    = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record for Last Name starting with 'a'");
            Assert.AreEqual <string>("Mary", result[0].FirstName,
                                     "The first record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Andersen", result[0].LastName,
                                     "The first record in the list should be 'Mary Andersen'");
        }
        public void ExactSearchBasedOnZip()
        {
            findCustomer.Zip   = "98177";
            findCustomerResult = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record with Zip as '98177'");
            Assert.AreEqual <string>("Mary", result[0].FirstName,
                                     "The first record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Andersen", result[0].LastName,
                                     "The first record in the list should be 'Mary Andersen'");
        }
        public void ExactSearchBasedOnCellNumber()
        {
            findCustomer.CellNumber = "7777777777";
            findCustomerResult      = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record with Mobile Phone as 777-777-7777");
            Assert.AreEqual <string>("Mary", result[0].FirstName,
                                     "The first record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Andersen", result[0].LastName,
                                     "The first record in the list should be 'Mary Andersen'");
        }
        public void SearchBasedOnMultipleCriteria()
        {
            findCustomer.FirstName = "Ma";
            findCustomer.LastName  = "An";

            findCustomerResult = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(1, result.Length,
                                  "Should return 1 record for First Name starting with 'Ma' and Last Name starting with 'An'");
            Assert.AreEqual <string>("Mary", result[0].FirstName,
                                     "The first record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Andersen", result[0].LastName,
                                     "The first record in the list should be 'Mary Andersen'");
        }
        public void CustomerAddedToQueueOnlyOnce()
        {
            //Add Deb Mathew to Queue
            findCustomerResults.QueueForService();

            //Add Dean John to Queue
            findCustomer           = shell.FindCustomer();
            findCustomer.FirstName = "de";
            findCustomerResults    = findCustomer.Find();
            findCustomerResults.QueueForService();

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

            Assert.AreEqual <int>(1, customersInQueue.Count, "There should be 1 customer in the Queue");
            Assert.AreEqual <string>("Dean J John", customersInQueue[0], "Dean John should be the only person in the Queue");
        }
        public void StartWithSearchBasedOnStreet()
        {
            findCustomer.Street = "1";
            findCustomerResult  = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(2, result.Length,
                                  "Should return 2 record for Street starting with '1'");
            Assert.AreEqual <string>("Mary", result[0].FirstName,
                                     "The first record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Andersen", result[0].LastName,
                                     "The first record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Kari", result[1].FirstName,
                                     "The second record in the list should be 'Kari Hensien'");
            Assert.AreEqual <string>("Hensien", result[1].LastName,
                                     "The second record in the list should be 'Kari Hensien'");
        }
Beispiel #14
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 NoRecordsFoundMessageDisplayedWhenZeroResults()
        {
            Exception caughtException = null;

            findCustomerResult      = null;
            findCustomer.HomeNumber = "2345461212";

            try
            {
                findCustomerResult = findCustomer.Find();
            }
            catch (Exception ex)
            {
                caughtException = ex;
            }

            Assert.IsNull(findCustomerResult, "Find Cusomer Results Screen displayed when no results are found");
            Assert.IsTrue(caughtException != null && caughtException is WindowNotFoundException, "Find Cusomer Results Screen displayed when no results are found");
            Assert.IsTrue(findCustomer.IsMessageDisplayed, "'No Results Found' message not displayed");
        }
Beispiel #16
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 ExactSearchBasedOnState()
        {
            findCustomer.State = "WA";
            findCustomerResult = findCustomer.Find();
            CustomerResult[] result = findCustomerResult.GetResults();

            Assert.AreEqual <int>(3, result.Length,
                                  "Should return 3 records with State as 'WA'");
            Assert.AreEqual <string>("Leonids", result[0].FirstName,
                                     "The first record in the list should be 'Leonids Paturskis'");
            Assert.AreEqual <string>("Paturskis", result[0].LastName,
                                     "The first record in the list should be 'Leonids Paturskis'");
            Assert.AreEqual <string>("Mary", result[1].FirstName,
                                     "The second record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Andersen", result[1].LastName,
                                     "The second record in the list should be 'Mary Andersen'");
            Assert.AreEqual <string>("Kari", result[2].FirstName,
                                     "The third record in the list should be 'Kari Hensien'");
            Assert.AreEqual <string>("Hensien", result[2].LastName,
                                     "The third record in the list should be 'Kari Hensien'");
        }
        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");
        }
 public void EnterKeyMappedToFindButton()
 {
     findCustomer.FirstName = "kari";
     findCustomerResult     = findCustomer.EnterPressed();
     Assert.IsNotNull(findCustomerResult, "Find Customer Results Screen is not displayed");
 }