|
6 | 6 | import org.openapitools.client.auth.HttpBasicAuth; |
7 | 7 | import org.openapitools.client.model.Media; |
8 | 8 | import org.openapitools.client.Configuration; |
9 | | -import org.junit.BeforeClass; |
| 9 | +import org.junit.jupiter.api.BeforeAll; |
10 | 10 | import org.junit.jupiter.api.Order; |
11 | 11 | import org.junit.jupiter.api.Test; |
12 | 12 | import org.junit.jupiter.api.TestMethodOrder; |
|
25 | 25 |
|
26 | 26 | @TestMethodOrder(OrderAnnotation.class) |
27 | 27 | public class MediaApiTest { |
28 | | - |
29 | | - @BeforeClass |
30 | | - public void setupBeforeClass() { |
31 | | - this.uuid = UUID.randomUUID(); |
32 | | - } |
33 | | - |
34 | 28 | ApiClient defaultClient = Configuration.getDefaultApiClient(); |
35 | 29 | HttpBasicAuth Basic = (HttpBasicAuth) defaultClient.getAuthentication("Basic"); |
36 | 30 | private final MediaApi api = new MediaApi(defaultClient); |
37 | 31 |
|
38 | 32 | private String mediaPath = "src/test/java/org/openapitools/client/fixtures/"; |
39 | 33 | private String mediaFile = "java_cat.jpeg"; |
40 | | - private UUID uuid = null; |
41 | | - private String mediaId = JAVA_VERSION + "_" + RUNNER_OS + "_" + this.uuid + "_" + mediaFile; |
| 34 | + private static UUID uuid; |
| 35 | + private String mediaId = JAVA_VERSION + "_" + RUNNER_OS + "_" + uuid + "_" + mediaFile; |
42 | 36 | private File media = new File(mediaPath + mediaFile); |
43 | 37 | private String content_type = "image/jpeg"; |
44 | 38 | private String cache_control = "no-cache"; |
45 | 39 |
|
| 40 | + @BeforeAll |
| 41 | + public static void setupBeforeClass() { |
| 42 | + uuid = UUID.randomUUID(); |
| 43 | + } |
| 44 | + |
46 | 45 | @Test |
47 | 46 | @Order(1) |
48 | 47 | public void uploadMedia() throws ApiException { |
|
0 commit comments