Exemplo n.º 1
0
 /// <summary>
 ///   Connects an event listener to our message bus
 /// </summary>
 /// <param name = "listener">The event listener, which will be marshalled from another AppDomain</param>
 /// <param name = "context">Run context event raiser</param>
 /// <remarks>
 ///   We cannot pass the message bus instance to the event listener, since the listener may be in a remote AppDomain
 /// </remarks>
 private static void RegisterEventListener(IEventListener listener, IRunContextEvents context)
 {
     context.OnRunStarted       += (s, e) => listener.RunStarted();
     context.OnRunFinished      += (s, e) => listener.RunFinished();
     context.OnFeatureStarted   += (s, e) => listener.FeatureStarted(e.EventInfo);
     context.OnFeatureFinished  += (s, e) => listener.FeatureFinished(e.EventInfo);
     context.OnScenarioStarted  += (s, e) => listener.ScenarioStarted(e.EventInfo.Title);
     context.OnScenarioFinished += (s, e) => listener.ScenarioFinished(e.EventInfo);
 }
Exemplo n.º 2
0
 /// <summary>
 ///   Connects an event listener to our message bus
 /// </summary>
 /// <param name = "listener">The event listener, which will be marshalled from another AppDomain</param>
 /// <param name = "context">Run context event raiser</param>
 /// <remarks>
 ///   We cannot pass the message bus instance to the event listener, since the listener may be in a remote AppDomain
 /// </remarks>
 private static void RegisterEventListener(IEventListener listener, IRunContextEvents context)
 {
     context.OnRunStarted += (s, e) => listener.RunStarted();
     context.OnRunFinished += (s, e) => listener.RunFinished();
     context.OnFeatureStarted += (s, e) => listener.FeatureStarted(e.EventInfo);
     context.OnFeatureFinished += (s, e) => listener.FeatureFinished(e.EventInfo);
     context.OnScenarioStarted += (s, e) => listener.ScenarioStarted(e.EventInfo.Title);
     context.OnScenarioFinished += (s, e) => listener.ScenarioFinished(e.EventInfo);
 }
Exemplo n.º 3
0
 public void SubscribeToHubEvents(IRunContextEvents context)
 {
     contextEvents               = context;
     context.OnRunStarted       += OnRunStarted;
     context.OnRunFinished      += OnRunFinished;
     context.OnFeatureStarted   += OnFeatureStarted;
     context.OnFeatureFinished  += OnFeatureFinished;
     context.OnScenarioStarted  += OnScenarioStarted;
     context.OnScenarioFinished += OnScenarioFinished;
     context.OnStepStarted      += OnStepStarted;
     context.OnStepFinished     += OnStepFinished;
 }
Exemplo n.º 4
0
            public void Init()
            {
                var catalog = new HooksCatalog();
                var loader  = new HooksParser(catalog);

                loader.FindHooks(GetType());

                var handler = new HooksHandler(catalog);

                context = MockRepository.GenerateStub <IRunContextEvents>();
                handler.SubscribeToHubEvents(context);

                SetupContextTags();
            }
Exemplo n.º 5
0
            public void Init()
            {
                var catalog = new HooksCatalog();
                var loader = new HooksParser(catalog);
                loader.FindHooks(GetType());

                var handler = new HooksHandler(catalog);
                context = MockRepository.GenerateStub<IRunContextEvents>();
                handler.SubscribeToHubEvents(context);

                SetupContextTags();
            }