コード例 #1
0
        public void ThenISeeHeaderDetailsInEditDCFPage(Table table)
        {
            EditDCFPageHeaderData data = table.CreateInstance <EditDCFPageHeaderData>();

            if (!BP_EditDCFPageUtilities.VerifyEditDCFPageHeaderDetails(data))
            {
                ScenarioContext.Current["ActResult"] = "Failed";
            }
        }
コード例 #2
0
        public static bool VerifyEditDCFPageHeaderDetails(EditDCFPageHeaderData data)
        {
            bool retVal = true;

            try
            {
                if (!String.IsNullOrEmpty(data.Patient))
                {
                    retVal = data.Patient.Equals(Control_PropertyUtilities.GetText(DL_EditDCFPage.PatientNameLabel), StringComparison.InvariantCultureIgnoreCase);
                }
                if (retVal && !String.IsNullOrEmpty(data.PrimaryInvestigator))
                {
                    retVal = data.PrimaryInvestigator.Equals(Control_PropertyUtilities.GetText(DL_EditDCFPage.PrimaryInvestigatorLabel), StringComparison.InvariantCultureIgnoreCase);
                }
                if (retVal && !String.IsNullOrEmpty(data.CreatedBy))
                {
                    retVal = data.CreatedBy.Equals(Control_PropertyUtilities.GetText(DL_EditDCFPage.CreatedByUserNameLabel), StringComparison.InvariantCultureIgnoreCase);
                }
                if (retVal && !String.IsNullOrEmpty(data.DCFID))
                {
                    retVal = data.DCFID.Equals(Control_PropertyUtilities.GetText(DL_EditDCFPage.DCFIDLabel), StringComparison.InvariantCultureIgnoreCase);
                }
                if (retVal && !String.IsNullOrEmpty(data.DCFStatus))
                {
                    retVal = data.DCFStatus.Equals(Control_PropertyUtilities.GetText(DL_EditDCFPage.DCFStatusLabel), StringComparison.InvariantCultureIgnoreCase);
                }
                if (retVal && !String.IsNullOrEmpty(data.QueryReference))
                {
                    retVal = data.QueryReference.Equals(Control_PropertyUtilities.GetText(DL_EditDCFPage.QueryReferenceLabel), StringComparison.InvariantCultureIgnoreCase);
                }
            }
            catch (Exception e)
            {
                new DebugLogGenerator().WriteException(MethodBase.GetCurrentMethod().DeclaringType.Name, MethodBase.GetCurrentMethod().Name, e);
                retVal = false;
            }
            return(retVal);
        }