Ejemplo n.º 1
0
        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());
        }
Ejemplo n.º 2
0
        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());
        }
Ejemplo n.º 3
0
        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
        }
Ejemplo n.º 4
0
        public virtual void InitializeTestRunner(Assembly[] bindingAssemblies)
        {
            bindingRegistry = new BindingRegistry();
            foreach (Assembly assembly in bindingAssemblies)
            {
                bindingRegistry.BuildBindingsFromAssembly(assembly);
            }

            OnTestRunnerStart();
            AppDomain.CurrentDomain.DomainUnload +=
                delegate
                    {
                        OnTestRunnerEnd();
                    };
        }