예제 #1
0
        public void ClearNotifiers_should_reset_it_to_NoProgressNotifier()
        {
            var configuration = new FeatureProgressNotifierConfiguration()
                                .UpdateNotifier(new DelegatingFeatureProgressNotifier())
                                .ClearNotifiers();

            Assert.That(configuration.Notifier, Is.InstanceOf <NoProgressNotifier>());
        }
예제 #2
0
        public void AppendNotifiers_should_append_notifiers_to_existing_ones()
        {
            var notifier1 = Mock.Of <IFeatureProgressNotifier>();
            var notifier2 = Mock.Of <IFeatureProgressNotifier>();
            var notifier3 = Mock.Of <IFeatureProgressNotifier>();
            var notifier4 = Mock.Of <IFeatureProgressNotifier>();

            var configuration = new FeatureProgressNotifierConfiguration()
                                .AppendNotifiers(notifier1, notifier2)
                                .AppendNotifiers(notifier3)
                                .AppendNotifiers(notifier4);

            Assert.That(configuration.Notifier, Is.InstanceOf <DelegatingFeatureProgressNotifier>());
            Assert.That(((DelegatingFeatureProgressNotifier)configuration.Notifier).Notifiers, Is.EqualTo(new[] { notifier1, notifier2, notifier3, notifier4 }));
        }
예제 #3
0
        public void Should_initialize_object_with_default_values()
        {
            var configuration = new FeatureProgressNotifierConfiguration();

            Assert.That(configuration.Notifier, Is.InstanceOf <NoProgressNotifier>());
        }
예제 #4
0
        public void UpdateNotifier_should_update_configuration()
        {
            var configuration = new FeatureProgressNotifierConfiguration().UpdateNotifier(new DelegatingFeatureProgressNotifier());

            Assert.That(configuration.Notifier, Is.InstanceOf <DelegatingFeatureProgressNotifier>());
        }
 /// <summary>
 /// Appends LightBDD.Fixie2 default feature progress notifiers.
 /// </summary>
 public static FeatureProgressNotifierConfiguration AppendFrameworkDefaultProgressNotifiers(this FeatureProgressNotifierConfiguration configuration)
 {
     return(configuration.AppendNotifiers(FixieProgressNotifier.CreateFeatureProgressNotifier()));
 }