public void ShouldFindExampleConverter() { BindingRegistry registry = new BindingRegistry(); registry.BuildBindingsFromAssembly(Assembly.GetExecutingAssembly()); Assert.AreEqual(1, registry.StepTransformations.Where(s => s.Regex != null && s.Regex.Match("BindingRegistryTests").Success && s.Regex.Match("").Success == false).Count()); }
public void ShouldFindScopedExampleConverter() { BindingRegistry registry = new BindingRegistry(); registry.BuildBindingsFromAssembly(Assembly.GetExecutingAssembly()); Assert.AreEqual(2, registry.Where(s => s.Regex.Match("SpecificBindingRegistryTests").Success && s.IsScoped).Count()); Assert.AreEqual(0, registry.Where(s => s.Regex.Match("SpecificBindingRegistryTests").Success && s.IsScoped == false).Count()); }
public virtual void InitializeTestRunner(Assembly[] bindingAssemblies) { foreach (Assembly assembly in bindingAssemblies) { bindingRegistry.BuildBindingsFromAssembly(assembly); } OnTestRunnerStart(); #if !SILVERLIGHT AppDomain.CurrentDomain.DomainUnload += delegate { OnTestRunnerEnd(); }; //TODO: Siverlight #endif }
public virtual void InitializeTestRunner(Assembly[] bindingAssemblies) { bindingRegistry = new BindingRegistry(); foreach (Assembly assembly in bindingAssemblies) { bindingRegistry.BuildBindingsFromAssembly(assembly); } OnTestRunnerStart(); AppDomain.CurrentDomain.DomainUnload += delegate { OnTestRunnerEnd(); }; }