示例#1
0
 public _Statement_60(TestJettyHelper _enclosing, FrameworkMethod frameworkMethod,
                      Statement statement)
 {
     this._enclosing      = _enclosing;
     this.frameworkMethod = frameworkMethod;
     this.statement       = statement;
 }
示例#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();
        }
示例#3
0
 /// <exception cref="System.Exception"/>
 public virtual void TestJettyNoAnnotation2()
 {
     TestJettyHelper.GetJettyURL();
 }
示例#4
0
 /// <exception cref="System.Exception"/>
 public virtual void TestJettyNoAnnotation()
 {
     TestJettyHelper.GetJettyServer();
 }