public void AppendNotifierProvider_should_not_throw_StackOverflowException_when_added_self() { var notifier1 = Mock.Of <IScenarioProgressNotifier>(); var configuration = new ScenarioProgressNotifierConfiguration(); configuration.UpdateNotifierProvider(() => notifier1); configuration .AppendNotifierProviders(configuration.NotifierProvider); var notifier = configuration.NotifierProvider(new object()); notifier.NotifyScenarioStart(Mock.Of <IScenarioInfo>()); Mock.Get(notifier1).Verify(x => x.NotifyScenarioStart(It.IsAny <IScenarioInfo>()), Times.Exactly(2)); }
/// <summary> /// Appends LightBDD.Fixie2 default scenario progress notifiers. /// </summary> public static ScenarioProgressNotifierConfiguration AppendFrameworkDefaultProgressNotifiers(this ScenarioProgressNotifierConfiguration configuration) { return(configuration .AppendNotifierProviders(FixieProgressNotifier.CreateImmediateScenarioProgressNotifier)); }
/// <summary> /// Appends LightBDD.XUnit2 default scenario progress notifiers. /// </summary> public static ScenarioProgressNotifierConfiguration AppendFrameworkDefaultProgressNotifiers(this ScenarioProgressNotifierConfiguration configuration) { return(configuration .AppendNotifierProviders(XUnit2ProgressNotifier.CreateImmediateScenarioProgressNotifier) .AppendNotifierProviders <ITestOutputProvider>(XUnit2ProgressNotifier.CreateSummarizingScenarioProgressNotifier)); }
/// <summary> /// Appends LightBDD.MsTest2 default scenario progress notifiers. /// </summary> public static ScenarioProgressNotifierConfiguration AppendFrameworkDefaultProgressNotifiers(this ScenarioProgressNotifierConfiguration configuration) { return(configuration.AppendNotifierProviders <ITestContextProvider>(MsTest2ProgressNotifier.CreateScenarioProgressNotifier)); }