Return-Path: Delivered-To: apmail-jakarta-httpcomponents-commits-archive@www.apache.org Received: (qmail 34179 invoked from network); 25 Aug 2007 08:03:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Aug 2007 08:03:03 -0000 Received: (qmail 93893 invoked by uid 500); 25 Aug 2007 08:02:59 -0000 Delivered-To: apmail-jakarta-httpcomponents-commits-archive@jakarta.apache.org Received: (qmail 93875 invoked by uid 500); 25 Aug 2007 08:02:59 -0000 Mailing-List: contact httpcomponents-commits-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: httpcomponents-dev@jakarta.apache.org Delivered-To: mailing list httpcomponents-commits@jakarta.apache.org Received: (qmail 93866 invoked by uid 99); 25 Aug 2007 08:02:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Aug 2007 01:02:59 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 25 Aug 2007 08:03:38 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B8DAD1A9832; Sat, 25 Aug 2007 01:02:31 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r569639 - /jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicLineParser.java Date: Sat, 25 Aug 2007 08:02:31 -0000 To: httpcomponents-commits@jakarta.apache.org From: rolandw@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20070825080231.B8DAD1A9832@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rolandw Date: Sat Aug 25 01:02:30 2007 New Revision: 569639 URL: http://svn.apache.org/viewvc?rev=569639&view=rev Log: adjusted test cases to expect ParseException instead of ProtocolException Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicLineParser.java Modified: jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicLineParser.java URL: http://svn.apache.org/viewvc/jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicLineParser.java?rev=569639&r1=569638&r2=569639&view=diff ============================================================================== --- jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicLineParser.java (original) +++ jakarta/httpcomponents/httpcore/trunk/module-main/src/test/java/org/apache/http/message/TestBasicLineParser.java Sat Aug 25 01:02:30 2007 @@ -30,9 +30,8 @@ package org.apache.http.message; -import org.apache.http.HttpException; import org.apache.http.HttpVersion; -import org.apache.http.ProtocolException; +import org.apache.http.ParseException; import org.apache.http.RequestLine; import org.apache.http.StatusLine; import org.apache.http.message.BasicRequestLine; @@ -96,28 +95,28 @@ try { BasicLineParser.parseRequestLine(" ", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } try { BasicLineParser.parseRequestLine(" GET", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } try { BasicLineParser.parseRequestLine("GET /stuff", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } try { BasicLineParser.parseRequestLine("GET/stuff HTTP/1.1", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } } @@ -221,27 +220,27 @@ try { BasicLineParser.parseStatusLine("xxx 200 OK", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } try { BasicLineParser.parseStatusLine("HTTP/1.1 xxx OK", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } try { BasicLineParser.parseStatusLine("HTTP/1.1 ", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } try { BasicLineParser.parseStatusLine("HTTP/1.1", null); fail(); - } catch (HttpException e) { + } catch (ParseException e) { // expected } } @@ -308,71 +307,71 @@ try { BasicLineParser.parseProtocolVersion (" ", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTT", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("crap", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/crap", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/1", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/1234 ", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/1.", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/1.1 crap", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/whatever.whatever whatever", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } try { BasicLineParser.parseProtocolVersion ("HTTP/1.whatever whatever", null); - fail("ProtocolException should have been thrown"); - } catch (ProtocolException e) { + fail("ParseException should have been thrown"); + } catch (ParseException e) { //expected } }