public void SetUp()
 {
     XmlDocument doc = new XmlDocument();
     doc.LoadXml(Rules);
     context = new ContextFacadeStub();
     rewriter = new RewriterEngine(context, RewriterConfiguration.LoadFromNode(doc.SelectSingleNode("rewriter")));
 }
        public void SetUp()
        {
            string rawXml = @"
            <rewriter>
            <register logger='Rewrite.Test.Log4NetRewriteLogger, Rewrite.Test' />

            <!-- our library -->
            <rewrite url='/Library/(.+)' to='~/Portal/GetLibraryFile.aspx?Path=$1' />

            <!-- once the library files have been dealt with, ignore these files: -->
            <rewrite url='^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js)(\?.+)?)$' to='$1' processing='stop' />

            <!-- the 'sample' site -->
            <rewrite url='/sample/(.+)' to='~/Portal/GetPortalPage.aspx?Requested=Sample/$1' />

            <!-- client site -->
            <rewrite url='/site/(.+)' to='~/Portal/DisplayPortalPage.aspx?Requested=site/$1' />

            <!-- index page rewritten -->
            <rewrite url='/index.aspx' to='~/Portal/DisplayPortalPage.aspx?Requested=site/index.aspx' />

            <!-- handles default page request (should redirect to index.aspx, then reprocess) -->
            <rewrite url='^(.*)/(\?.+)?$' to='$1/index.aspx$2?' processing='restart' />
            </rewriter>
            ";

            XmlDocument doc = new XmlDocument();
            doc.LoadXml(rawXml);
            //redirInstance = new UrlRedirection(doc, DebugLogEnabled);
            context = new ContextFacadeStub();
            rewriter = new RewriterEngine(context, RewriterConfiguration.LoadFromNode(doc.SelectSingleNode("rewriter")));
        }