Esempio n. 1
0
        public FixtureLibrary StartSystem(FixtureAssembly fixtureAssembly, MarshalByRefObject remotePublisher)
        {
            _publisher = (IEventPublisher)remotePublisher;

            // TODO -- if fails, do a Thread.Sleep and try again
            _system = fixtureAssembly.FindSystem();
            ProjectFileSystem.RootFolder = fixtureAssembly.RootFolder;

            Project.Current = new Project
            {
                Profile = fixtureAssembly.Profile
            };

            try
            {
                var library = FixtureGraph.Library;
                _runner = new TestRunner(_system, library);
                if (_listener != null)
                {
                    _runner.Listener = _listener;
                }

                return library;
            }
            catch (TestEngineFailureException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new TestEngineFailureException(e.ToString());
            }
        }
        public void use_the_single_type_from_the_named_assembly()
        {
            var fa = new FixtureAssembly
            {
                AssemblyName = typeof (ExampleSystem).Assembly.GetName().Name
            };

            fa.DetermineSystemType().ShouldEqual(typeof (ExampleSystem));
            fa.FindSystem().ShouldBeOfType<ExampleSystem>();
        }