Ejemplo n.º 1
0
 /// <summary>
 /// Method allowing to retrieve the <see cref="IBddRunner"/> instance from <see cref="IFeatureRunner"/>.
 /// The <see cref="IBddRunner"/> is a main runner interface that should be used for executing LightBDD scenarios, while the interfaces coming from LightBDD.Core namespace should be used only in integration projects.
 /// </summary>
 /// <param name="featureRunner">Instance of <see cref="IFeatureRunner"/>.</param>
 /// <param name="fixture">Feature fixture instance.</param>
 /// <returns></returns>
 public static IBddRunner GetBddRunner(this IFeatureRunner featureRunner, object fixture)
 {
     if (featureRunner == null)
     {
         throw new ArgumentNullException(nameof(featureRunner));
     }
     return(new BddRunner(featureRunner.ForFixture(fixture).AsEnrichable()));
 }
 public void Disposed_feature_should_not_allow_creating_new_runners()
 {
     _feature.Dispose();
     Assert.Throws <ObjectDisposedException>(() => _feature.ForFixture(this));
 }