public void Should_find_hook(Type typeOfHook) { var hooksCatalog = new HooksCatalog(); var h = new HooksParser(hooksCatalog); h.FindHooks(GetType()); Assert.IsTrue(hooksCatalog.OfType(typeOfHook).Any()); }
public void Should_find_hook_in_nested_class(Type typeOfHook) { var c = new HooksCatalog(); var p = new HooksParser(c); p.FindHooks(typeof(When_running_hooks_with_tag_filter.When_matching_tag_for_RunIfHasTags)); Assert.IsTrue(c.OfType(typeOfHook).Any()); }
public ScenarioBuilder(Feature feature, string scenarioTitle) { Feature = feature; _scenarioTitle = scenarioTitle; hooksCatalog = new HooksCatalog(); SetupHooks(); }
public void Should_find_hook_in_nested_class(Type typeOfHook) { var c = new HooksCatalog(); var p = new HooksParser(c); p.FindHooks(typeof(When_running_hooks_with_tag_filter.When_matching_tag_for_RunIfHasTags)); Assert.IsTrue(c.OfType(typeOfHook).Any()); }
public void Should_find_hook(Type typeOfHook) { var hooksCatalog = new HooksCatalog(); var h = new HooksParser(hooksCatalog); h.FindHooks(GetType()); Assert.IsTrue(hooksCatalog.OfType(typeOfHook).Any()); }
public virtual void SetUp() { hooksCatalog = new HooksCatalog(); actionCatalog = new ActionCatalog(); var runContext = new RunContext(MockRepository.GenerateStub <IContextHandler>(), new HooksHandler(hooksCatalog)); IStringStepRunner stringStepRunner = new StringStepRunner(actionCatalog); featureRunner = new FeatureRunner(stringStepRunner, runContext); }
public void Should_find_hook_on_private_Action_delegate() { var c = new HooksCatalog(); var p = new HooksParser(c); PrivateDelegateHookCalled = false; p.FindHooks(GetType()); var hooks = c.OfType<BeforeRunAttribute>().ToList(); hooks.Each(_ => _.Invoke()); Assert.IsTrue(PrivateDelegateHookCalled); }
public void Should_find_hook_on_private_Action_delegate() { var c = new HooksCatalog(); var p = new HooksParser(c); PrivateDelegateHookCalled = false; p.FindHooks(GetType()); var hooks = c.OfType <BeforeRunAttribute>().ToList(); hooks.Each(_ => _.Invoke()); Assert.IsTrue(PrivateDelegateHookCalled); }
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(); }
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(); }
private static void InitializeHooks(NBehaveConfiguration configuration, HooksCatalog hooksCatalog) { new LoadHooks(configuration, hooksCatalog).Initialise(); }
public LoadHooks(NBehaveConfiguration configuration, HooksCatalog hooks) { _configuration = configuration; _hooks = hooks; }
public HooksHandler(HooksCatalog hooks) { this.hooks = hooks; }
private static void InitializeHooks(NBehaveConfiguration configuration, HooksCatalog hooksCatalog) { new LoadHooks(configuration, hooksCatalog).Initialise(); }
public LoadHooks(NBehaveConfiguration configuration, HooksCatalog hooks) { _configuration = configuration; _hooks = hooks; }