File tree Expand file tree Collapse file tree 1 file changed +12
-15
lines changed
src/test/java/io/jenkins/plugins/httpclient5 Expand file tree Collapse file tree 1 file changed +12
-15
lines changed Original file line number Diff line number Diff line change 30
30
import org .apache .hc .client5 .http .fluent .Request ;
31
31
import org .apache .hc .client5 .http .fluent .Response ;
32
32
import org .apache .hc .core5 .http .HttpStatus ;
33
- import org .junit .Rule ;
34
- import org .junit .Test ;
35
- import org .jvnet .hudson .test .JenkinsRule ;
36
- import org .jvnet .hudson .test .RealJenkinsRule ;
33
+ import org .junit .jupiter .api .Test ;
34
+ import org .junit .jupiter .api .extension .RegisterExtension ;
35
+ import org .jvnet .hudson .test .junit .jupiter .RealJenkinsExtension ;
37
36
38
- public class SmokeTest {
37
+ class SmokeTest {
39
38
40
- @ Rule
41
- public RealJenkinsRule rr = new RealJenkinsRule ();
39
+ @ RegisterExtension
40
+ private final RealJenkinsExtension extension = new RealJenkinsExtension ();
42
41
43
42
@ Test
44
- public void smokeTest () throws Throwable {
45
- rr .then (SmokeTest ::_smokeTest );
46
- }
47
-
48
- private static void _smokeTest (JenkinsRule r ) throws Exception {
49
- URI uri = r .getURL ().toURI ();
50
- Response response = Request .get (uri ).execute ();
51
- assertEquals (HttpStatus .SC_OK , response .returnResponse ().getCode ());
43
+ void smokeTest () throws Throwable {
44
+ extension .then (r -> {
45
+ URI uri = r .getURL ().toURI ();
46
+ Response response = Request .get (uri ).execute ();
47
+ assertEquals (HttpStatus .SC_OK , response .returnResponse ().getCode ());
48
+ });
52
49
}
53
50
}
You can’t perform that action at this time.
0 commit comments