public void Setup()
        {
            string objectXml = "<?xml version=\"1.0\" encoding=\"utf-8\" ?> " +
                               "  <objects xmlns=\"http://www.springframework.net\" " +
                               "    xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
                               "    xsi:schemaLocation=\"http://www.springframework.net http://www.springframework.net/xsd/spring-objects.xsd\"> " +
                               "    <object id=\"SimpleController\" singleton=\"false\" type=\"" + typeof(SpringSimpleController).FullName + "\"/> " +
                               "    <object id=\"DisposableController\" singleton=\"false\" type=\"" + typeof(SpringDisposableController).FullName + "\"/> " +
                               "    <object id=\"TestAreaSimpleController\" singleton=\"false\" type=\"" + typeof(TestArea.SpringSimpleController).FullName + "\"/>" +
                               "  </objects>";

            var stream  = new MemoryStream(Encoding.Default.GetBytes(objectXml));
            var factory = new XmlObjectFactory(new InputStreamResource(stream, "In memory xml"));

            SpringControllerFactory.Configure(factory);

            _factory = new SpringControllerFactory();

            _context = new RequestContext(MvcMockHelpers.DynamicHttpContextBase(), new RouteData());
        }
 public void Should_throw_when_not_configured()
 {
     SpringControllerFactory.Configure(null);
     Assert.Throws <ArgumentException>(() => _factory.CreateController(_context, "Simple"));
 }