Пример #1
0
        public static IContainer ContainerFor(Action <FixtureRegistry> action)
        {
            var registry = new FixtureRegistry();

            action(registry);

            return(registry.BuildContainer());
        }
Пример #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());
        }
Пример #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));
        }
Пример #4
0
 public void RegisterFixtures(FixtureRegistry registry)
 {
     _configure(registry);
 }
Пример #5
0
 public TestContext(Action <FixtureRegistry> action)
     : this(FixtureRegistry.ContainerFor(action), new Test("FAKE"), new TraceListener())
 {
 }
Пример #6
0
        public virtual void RegisterFixtures(FixtureRegistry registry)
        {
            Assembly assembly = GetType().Assembly;

            registry.AddFixturesFromAssembly(assembly);
        }