コード例 #1
0
        public bool CheckRequestStatus(Browser xrmBrowser, string ExpectedStatus)
        {
            // Done
            string RequestStatus = xrmBrowser.Entity.GetValue(new OptionSet {
                Name = "ldv_requeststatusid"
            });
            string RequestNumber = xrmBrowser.Entity.GetValue(new OptionSet {
                Name = "ldv_name"
            });

            if (!RequestStatus.Equals(ExpectedStatus))
            {
                Logg log = new Logg
                {
                    FailReason    = "Status is " + RequestStatus + " and it should be " + ExpectedStatus,
                    Result        = "Fail",
                    Stage         = RequestStatus,
                    RequestNumber = RequestNumber
                };

                ResultLog resultLog = new ResultLog();
                resultLog.WriteFailReason(log);
            }
            else if (RequestStatus.Contains("Completed"))
            {
                //TODOMariana
                //LogCaseResult(xrmBrowser, RequestNumber);
            }
            return(RequestStatus.Equals(ExpectedStatus));
        }
コード例 #2
0
        public void CheckItemCreated(Browser xrmBrowser, string ItemNumber, string Item, bool status)
        {
            ResultLog resultLog = new ResultLog();

            if (!status)
            {
                Logg log = new Logg
                {
                    FailReason = Item + " Not created Successfully",
                    Result     = "Partially Fail"
                };
                resultLog.WriteFailReason(log);
            }
            else
            {
                Logg log = new Logg
                {
                    RequestNumber = ItemNumber + " created Successfully",
                    Result        = "Partially Passed"
                };
                resultLog.WriteFinalResult(log);
            }
        }
コード例 #3
0
        public bool CheckStage(Browser xrmBrowser, Stages ExpectedStage)
        {
            // check current stage
            string currentStage        = xrmBrowser.BusinessProcessFlow.GetCurrentStage();
            var    checkStageIsCorrect = StagesValues[ExpectedStage].Equals(currentStage.Trim());


            // Assert.AreEqual(NewCraftStagesValues[ExpectedStage], currentStage.Trim(), "Stage is " + currentStage.Trim() + " and it should be " + NewCraftStagesValues[ExpectedStage]);
            if (!checkStageIsCorrect)
            {
                Logg log = new Logg
                {
                    FailReason = "Stage is " + currentStage.Trim() + " and it should be " + StagesValues[ExpectedStage],
                    Result     = "Fail",
                    Stage      = currentStage.Trim(),
                };

                ResultLog resultLog = new ResultLog();
                resultLog.WriteFailReason(log);
            }


            return(checkStageIsCorrect);
        }
コード例 #4
0
 internal void WriteFinalResult(Logg log)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 internal void WriteFailReason(Logg log)
 {
     throw new NotImplementedException();
 }