9
9
10
10
import java .io .IOException ;
11
11
import java .io .UnsupportedEncodingException ;
12
- import java .net .MalformedURLException ;
13
12
import java .net .ServerSocket ;
14
13
import java .net .URISyntaxException ;
15
14
import java .net .UnknownHostException ;
20
19
import javax .xml .bind .DatatypeConverter ;
21
20
22
21
import org .apache .http .client .ClientProtocolException ;
22
+ import org .apache .http .conn .UnsupportedSchemeException ;
23
23
import org .json .JSONException ;
24
24
import org .json .JSONObject ;
25
25
import org .junit .BeforeClass ;
@@ -33,11 +33,11 @@ public class JenkinsManagerTest {
33
33
34
34
private static final String UNKNOWN_HOST = "!¤€31" ;
35
35
private static final int PORT_OUT_OF_RANGE = 1000000 ;
36
- private static final String INVALID_PROTOCOL = "httg" ;
37
36
private static final String URL = "http://localhost" ;
38
37
private static final String USERNAME = "username" ;
39
38
private static final String PASSWORD = "password" ;
40
39
private static final String PROTOCOL = "http" ;
40
+ private static final String INVALID_PROTOCOL = "httg" ;
41
41
private static final String HOST = "localhost" ;
42
42
private static final String ENDPOINT_CRUMB = "/crumbIssuer/api/json" ;
43
43
private static final String RESPONSE_CRUMB = "{\" crumb\" :\" fb171d526b9cc9e25afe80b356e12cb7\" ,\" crumbRequestField\" :\" .crumb\" }" ;
@@ -119,7 +119,7 @@ public void jenkinsManagerConstructorFailCrumb()
119
119
assertEquals ("" , actualCrumb );
120
120
}
121
121
122
- @ Test (expected = MalformedURLException .class )
122
+ @ Test (expected = UnsupportedSchemeException .class )
123
123
public void jenkinsManagerConstructorInvalidProtocol ()
124
124
throws ClientProtocolException , URISyntaxException , IOException {
125
125
new JenkinsManager (INVALID_PROTOCOL , HOST , port , USERNAME , PASSWORD );
0 commit comments