Beispiel #1
0
        public static FixtureLibrary BuildLibrary(SystemLifecycle lifeCycle, IFixtureObserver observer, IContainer container, CompositeFilter <Type> filter)
        {
            try
            {
                var builder = new LibraryBuilder(observer, filter);
                observer.RecordStatus("Starting to rebuild the fixture model");

                var context = new TestContext(container);
                observer.RecordStatus("Setting up the system environment");
                lifeCycle.StartApplication();


                lifeCycle.SetupEnvironment();
                observer.RecordStatus("Registering the system services");
                lifeCycle.RegisterServices(context);

                builder.Finder = context.Finder;

                observer.RecordStatus("Starting to read fixtures");
                return(builder.Build(context));
            }
            finally
            {
                observer.RecordStatus("Finished rebuilding the fixture model");
            }
        }
        public void SetUp()
        {
            observer = MockRepository.GenerateMock<IFixtureObserver>();
            var filter = new CompositeFilter<Type>();
            filter.Includes += t => t.Name.StartsWith("M");

            builder = new LibraryBuilder(observer, filter);

            library = builder.Build(new TestContext(x => x.AddFixturesFromThisAssembly()));
        }
        public void SetUp()
        {
            observer = MockRepository.GenerateMock<IFixtureObserver>();
            builder = new LibraryBuilder(observer, new CompositeFilter<Type>());

            builder.FixtureCount = 23;
        }
Beispiel #4
0
 public TestRunnerBuilder(ISystem system, IFixtureObserver observer)
 {
     _system   = system;
     _observer = observer;
 }
        public void SetUp()
        {
            container = new Container();
            var registry = new FixtureRegistry();
            registry.AddFixturesFromThisAssembly();
            registry.AddFixturesToContainer(container);

            observer = MockRepository.GenerateMock<IFixtureObserver>();
            var filter = new CompositeFilter<Type>();
            filter.Includes += t => t.Name.StartsWith("M");

            builder = new LibraryBuilder(observer, filter, new ObjectConverter());

            library = builder.Build(new TestContext(container));
        }
Beispiel #6
0
 public LibraryBuilder(IFixtureObserver observer)
 {
     _observer = observer;
 }
 public LibraryBuilder(IFixtureObserver observer, CompositeFilter<Type> filter)
 {
     _observer = observer;
     _filter = filter;
 }
        public void SetUp()
        {
            observer = MockRepository.GenerateMock<IFixtureObserver>();
            builder = new LibraryBuilder(observer);

            builder.FixtureCount = 23;
        }
Beispiel #9
0
 public LibraryBuilder(IFixtureObserver observer, CompositeFilter <Type> filter)
 {
     _observer = observer;
     _filter   = filter;
 }