Ejemplo n.º 1
0
        public static IContainer ContainerFor(Action <FixtureRegistry> action)
        {
            var registry = new FixtureRegistry();

            action(registry);

            return(registry.BuildContainer());
        }
Ejemplo n.º 2
0
        private static ITestRunner ForSystem(ISystem system)
        {
            var registry = new FixtureRegistry();

            registry.AddFixturesFromAssembly(system.GetType().Assembly);

            var builder = new TestRunnerBuilder(system, new NulloFixtureObserver());

            return(builder.Build());
        }
Ejemplo n.º 3
0
        public ITestRunner Build()
        {
            var registry = new FixtureRegistry();

            _system.RegisterFixtures(registry);
            var        containerSource = new FixtureContainerSource(registry.BuildContainer());
            IContainer container       = containerSource.Build();
            var        observer        = _observer;

            var library = BuildLibrary(new SystemLifecycle(_system), observer, container, new CompositeFilter <Type>());

            return(new TestRunner(_system, library, containerSource));
        }
Ejemplo n.º 4
0
 public void RegisterFixtures(FixtureRegistry registry)
 {
     _configure(registry);
 }
Ejemplo n.º 5
0
 public TestContext(Action <FixtureRegistry> action)
     : this(FixtureRegistry.ContainerFor(action), new Test("FAKE"), new TraceListener())
 {
 }
Ejemplo n.º 6
0
        public virtual void RegisterFixtures(FixtureRegistry registry)
        {
            Assembly assembly = GetType().Assembly;

            registry.AddFixturesFromAssembly(assembly);
        }