public void RunFlowAndCreateReport() { //Arrange BusinessFlow mBF = new BusinessFlow(); mBF.Activities = new ObservableList <Activity>(); mBF.Name = "BF TEst timeline events listener"; mBF.Active = true; Activity activitiy1 = new Activity() { Active = true }; activitiy1.Active = true; mBF.Activities.Add(activitiy1); ActDummy action1 = new ActDummy() { Description = "Dummay action 1", Active = true }; activitiy1.Acts.Add(action1); mGingerRunner.Executor.BusinessFlows.Add(mBF); RunListenerBase.Start(); mGingerRunner.Executor.RunBusinessFlow(mBF); //Act NewHTMLReport newHTMLReport = new NewHTMLReport(); ReportInfo reportInfo = new ReportInfo("aaa"); // !!!!!!!!!!!!!!! string s = newHTMLReport.CreateReport(reportInfo); //Assert // Assert.AreEqual(1, events.Count, "Events count"); }
public static void ClassInitialize(TestContext TestContext) { mGingerRunner = new GingerRunner(); mGingerRunner.RunListeners.Clear(); // temp as long as GR auto start with some listener, remove when fixed mExecutionDumperListener = new ExecutionDumperListener(mDumpFolder); mGingerRunner.RunListeners.Add(mExecutionDumperListener); RunListenerBase.Start(); }
public static void ClassInitialize(TestContext TestContext) { mGingerRunner = new GingerRunner(); mGingerRunnerTimeLine = new GingerRunnerTimeLine(); mGingerRunner.RunListeners.Add(mGingerRunnerTimeLine); RunListenerBase.Start(); Thread.Sleep(10); }
public void ExecutionListenerSimple() { //Arrange BusinessFlow mBF = new BusinessFlow(); mBF.Activities = new ObservableList <Activity>(); mBF.Name = "BF TEst timeline events listener"; mBF.Active = true; Activity activitiy1 = new Activity() { Active = true }; activitiy1.Active = true; mBF.Activities.Add(activitiy1); ActDummy action1 = new ActDummy() { Description = "Dummay action 1", Active = true }; activitiy1.Acts.Add(action1); mGingerRunner.BusinessFlows.Add(mBF); //Act RunListenerBase.Start(); mGingerRunner.RunBusinessFlow(mBF); mExecutionLogger.ExecutionLogBusinessFlowsCounter = 1; //Assert //TimeLineEvent actionLineEvent = activityTimeLineEvent.ChildrenList[1]; //Assert.IsTrue(actionLineEvent.Start != 0, "Action TimeLine Event.Start !=0"); //Assert.IsTrue(actionLineEvent.End != 0, "Action TimeLine Event.End !=0"); //Assert.AreEqual("Action", actionLineEvent.ItemType, "ItemType"); }