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)); }
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); } }
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); }
internal void WriteFinalResult(Logg log) { throw new NotImplementedException(); }
internal void WriteFailReason(Logg log) { throw new NotImplementedException(); }