TestScheme at 100% coverage for SchemeRegistry, too.

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@550083 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Roland Weber 2007-06-23 18:43:00 +00:00
parent 70e32c6503
commit 84168a156d
1 changed files with 5 additions and 0 deletions

View File

@ -123,11 +123,16 @@ public class TestScheme extends TestCase {
Scheme myhttp = new Scheme
("http", PlainSocketFactory.getSocketFactory(), 80);
HttpHost host = new HttpHost("www.test.invalid", -1, "http");
HttpHost hosts = new HttpHost("www.test.invalid", -1, "https");
assertNull(schmreg.register(myhttp));
assertNull(schmreg.register(https));
assertSame(myhttp, schmreg.register(http));
assertSame(http, schmreg.getScheme("http"));
assertSame(http, schmreg.getScheme(host));
assertSame(https, schmreg.getScheme("https"));
assertSame(https, schmreg.getScheme(hosts));
schmreg.unregister("http");
schmreg.unregister("https");