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 3030import org .apache .hc .client5 .http .fluent .Request ;
3131import org .apache .hc .client5 .http .fluent .Response ;
3232import 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 ;
3736
38- public class SmokeTest {
37+ class SmokeTest {
3938
40- @ Rule
41- public RealJenkinsRule rr = new RealJenkinsRule ();
39+ @ RegisterExtension
40+ private final RealJenkinsExtension extension = new RealJenkinsExtension ();
4241
4342 @ 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+ });
5249 }
5350}
You can’t perform that action at this time.
0 commit comments