コード例 #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();
 }