Ejemplo n.º 1
0
 public _Statement_60(TestJettyHelper _enclosing, FrameworkMethod frameworkMethod,
                      Statement statement)
 {
     this._enclosing      = _enclosing;
     this.frameworkMethod = frameworkMethod;
     this.statement       = statement;
 }
Ejemplo n.º 2
0
        public virtual void TestJetty()
        {
            Context context = new Context();

            context.SetContextPath("/");
            context.AddServlet(typeof(TestHFSTestCase.MyServlet), "/bar");
            Server server = TestJettyHelper.GetJettyServer();

            server.AddHandler(context);
            server.Start();
            Uri url = new Uri(TestJettyHelper.GetJettyURL(), "/bar");
            HttpURLConnection conn = (HttpURLConnection)url.OpenConnection();

            NUnit.Framework.Assert.AreEqual(conn.GetResponseCode(), HttpURLConnection.HttpOk);
            BufferedReader reader = new BufferedReader(new InputStreamReader(conn.GetInputStream
                                                                                 ()));

            NUnit.Framework.Assert.AreEqual(reader.ReadLine(), "foo");
            reader.Close();
        }
Ejemplo n.º 3
0
 /// <exception cref="System.Exception"/>
 public virtual void TestJettyNoAnnotation2()
 {
     TestJettyHelper.GetJettyURL();
 }
Ejemplo n.º 4
0
 /// <exception cref="System.Exception"/>
 public virtual void TestJettyNoAnnotation()
 {
     TestJettyHelper.GetJettyServer();
 }