コード例 #1
0
        /// <summary>
        /// Creates the request.
        /// </summary>
        /// <param name="request">The request.</param>
        public void CreateRequest(Request request)
        {
            DefaultPage defaultPage = new DefaultPage();

            defaultPage.PageHeader.OpenNewRequestPage();

            RequestPage requestPage = new RequestPage();

            Logger.Instance.Info("Filling request form.");
            requestPage.SelectFindADocService();
            requestPage.SelectCustomerNetwork(request.Data);
            requestPage.CallerPanel.FillPanel(request.Data);
            requestPage.ClaimIWPanel.FillPanel(request.Data);
            requestPage.InjuryPanel.FillPanel(request.Data);
            requestPage.EmployerPanel.FillPanel(request.Data);
            requestPage.AdjusterPanel.FillPanel(request.Data);
            requestPage.InsurancePanel.FillPanel(request.Data);
            requestPage.NurseCaseManagerPanel.FillPanel(request.Data);
            requestPage.ReferringDoctorPanel.FillPanel(request.Data);
            requestPage.AttorneyPanel.FillPanel(request.Data);
            requestPage.FindADoctorPanel.FillPanel(request.Data);

            requestPage.SaveRequest();

            if (requestPage.IsRequestKeyPresent())
            {
                request.Key = requestPage.GetRequestKey();
                Logger.Instance.Info("Request is successfully saved.");
                request.IsCreated = true;
            }
            else
            {
                Logger.Instance.Error("Request has not been saved.");
                request.IsCreated = false;
            }
        }
コード例 #2
0
        /// <summary>
        /// Verifies the request is sent by email.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <param name="email">The email.</param>
        /// <returns>
        /// Whether request is successfully sent by email.
        /// </returns>
        public bool VerifyRequestIsSentByEmail(Request request, string email)
        {
            RequestPage requestPage = new RequestPage();

            requestPage.SendRequestByEmail(email);

            Dictionary<string, string> emailData = FindDocEmailParser.GetEmailData();

            Dictionary<string, string> transformedData = DataTransformer.ToFindDocEmailData(request.Data);

            Logger.Instance.Info("Comparing request data to email data.");
            return DictionaryComparer.Equals(transformedData, emailData);
        }
コード例 #3
0
        /// <summary>
        /// Verifies the request content on UI.
        /// </summary>
        /// <param name="request">The request.</param>
        /// <returns>
        /// Whether request content equals to input data.
        /// </returns>
        public bool VerifyRequestContentOnUI(Request request)
        {
            RequestPage requestPage = new RequestPage();

            Dictionary<string, string> requestDataOnUI = new Dictionary<string, string>();

            Logger.Instance.Info("Reading request data from UI.");
            ////get customer/network value
            requestDataOnUI.Add("CustomerNetwork", requestPage.GetCustomerNetworkValue());

            ////get caller panel data
            requestPage.ExpandOrCollapsePanel("Caller");
            var callerPanelData = requestPage.CallerPanel.GetPanelData();
            foreach (var pair in callerPanelData)
            {
                requestDataOnUI.Add(pair.Key, pair.Value);
            }

            ////get claim/iw panel data
            requestPage.ExpandOrCollapsePanel("Claim/IW");
            var claimIWPanelData = requestPage.ClaimIWPanel.GetPanelData();
            foreach (var pair in claimIWPanelData)
            {
                requestDataOnUI.Add(pair.Key, pair.Value);
            }

            ////get employer panel data
            requestPage.ExpandOrCollapsePanel("Employer");
            var employerPanelData = requestPage.EmployerPanel.GetPanelData();
            foreach (var pair in employerPanelData)
            {
                requestDataOnUI.Add(pair.Key, pair.Value);
            }

            ////get attorney panel data
            requestPage.ExpandOrCollapsePanel("Attorney");
            var attorneyPanelData = requestPage.AttorneyPanel.GetPanelData();
            foreach (var pair in attorneyPanelData)
            {
                requestDataOnUI.Add(pair.Key, pair.Value);
            }

            ////get find a doctor panel data
            requestPage.ExpandOrCollapsePanel("Find a Doctor");
            var findADoctorPanelData = requestPage.FindADoctorPanel.GetPanelData();
            foreach (var pair in findADoctorPanelData)
            {
                requestDataOnUI.Add(pair.Key, pair.Value);
            }

            Logger.Instance.Info("Comparing request data to data on UI.");
            return DictionaryComparer.Equals(request.Data, requestDataOnUI);
        }