using System;
|
using System.ComponentModel;
|
using System.IO;
|
|
namespace OpenTap.Addin.Listener
|
{
|
public abstract class RootListener : IResultListener
|
{
|
protected string name;
|
public string Name { get => name; set => name = value; }
|
|
protected bool isConnected;
|
|
public bool IsConnected => isConnected;
|
|
protected TestPlanRun RootPlanRun;
|
|
protected TestPlanRun CurrentPlanRun;
|
|
protected IResultListener Root;
|
|
public event PropertyChangedEventHandler PropertyChanged;
|
|
public abstract IResultListener CreateChild();
|
|
public virtual void Close()
|
{
|
isConnected = false;
|
}
|
|
public abstract void OnResultPublished(Guid stepRunID, ResultTable result);
|
|
public abstract void OnTestPlanRunCompleted(TestPlanRun planRun, Stream logStream);
|
|
public virtual void OnTestPlanRunStart(TestPlanRun planRun)
|
{
|
CurrentPlanRun = planRun;
|
if (RootPlanRun == null)
|
{
|
RootPlanRun = planRun;
|
}
|
}
|
|
public abstract void OnTestStepRunCompleted(TestStepRun stepRun);
|
|
public abstract void OnTestStepRunStart(TestStepRun stepRun);
|
|
public virtual void Open()
|
{
|
isConnected = true;
|
}
|
}
|
}
|