This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit f664787a5bc2398e28714c5e91b76a0a98ff6be0 Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Fri Jul 24 16:25:52 2020 +0200 [CAMEL-11807] Upgrade camel-wordpress to junit5 --- components/camel-wordpress/pom.xml | 2 +- .../camel/component/wordpress/WordpressComponentTest.java | 6 ++++-- .../wordpress/WordpressComponentTestSupport.java | 10 +++++----- .../component/wordpress/WordpressPostOperationTest.java | 3 ++- .../component/wordpress/WordpressUserOperationTest.java | 3 ++- .../wordpress/api/model/PublishableStatusTest.java | 15 +++++++++------ .../service/impl/WordpressServicePostsAdapterTest.java | 8 ++++---- .../service/impl/WordpressServiceUsersAdapterTest.java | 8 ++++---- .../impl/ignored/WordpressServiceCategoriesAdapterIT.java | 12 ++++++------ .../impl/ignored/WordpressServiceCommentsAdapterIT.java | 12 ++++++------ .../impl/ignored/WordpressServicePagesAdapterIT.java | 12 ++++++------ .../ignored/WordpressServicePostRevisionAdapterIT.java | 12 ++++++------ .../impl/ignored/WordpressServiceTagsAdapterIT.java | 12 ++++++------ .../impl/ignored/WordpressServiceTaxonomyAdapterIT.java | 12 ++++++------ .../api/test/WordpressMockServerTestSupport.java | 8 ++++---- 15 files changed, 71 insertions(+), 64 deletions(-) diff --git a/components/camel-wordpress/pom.xml b/components/camel-wordpress/pom.xml index d88d1f9..1151fca 100644 --- a/components/camel-wordpress/pom.xml +++ b/components/camel-wordpress/pom.xml @@ -55,7 +55,7 @@ <!-- testing --> <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-test</artifactId> + <artifactId>camel-test-junit5</artifactId> <scope>test</scope> </dependency> <dependency> diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTest.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTest.java index ac3e69b..247471e 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTest.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTest.java @@ -18,16 +18,18 @@ package org.apache.camel.component.wordpress; import org.apache.camel.component.wordpress.api.model.PostOrderBy; import org.apache.camel.component.wordpress.api.model.PostSearchCriteria; -import org.apache.camel.test.junit4.CamelTestSupport; -import org.junit.Test; +import org.apache.camel.test.junit5.CamelTestSupport; +import org.junit.jupiter.api.Test; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.notNullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.not; +import static org.junit.jupiter.api.Assertions.assertNotNull; public class WordpressComponentTest extends CamelTestSupport { diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTestSupport.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTestSupport.java index 19ada74..04339b6 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTestSupport.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressComponentTestSupport.java @@ -19,18 +19,18 @@ package org.apache.camel.component.wordpress; import java.io.IOException; import org.apache.camel.component.wordpress.api.test.WordpressMockServerTestSupport; -import org.apache.camel.test.junit4.CamelTestSupport; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.apache.camel.test.junit5.CamelTestSupport; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; public class WordpressComponentTestSupport extends CamelTestSupport { - @BeforeClass + @BeforeAll public static void beforeClass() throws IOException { WordpressMockServerTestSupport.setUpMockServer(); } - @AfterClass + @AfterAll public static void afterClass() { WordpressMockServerTestSupport.tearDownMockServer(); } diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressPostOperationTest.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressPostOperationTest.java index c22035d..133d231 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressPostOperationTest.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressPostOperationTest.java @@ -22,9 +22,10 @@ import org.apache.camel.component.wordpress.api.WordpressConstants; import org.apache.camel.component.wordpress.api.model.Content; import org.apache.camel.component.wordpress.api.model.Post; import org.apache.camel.component.wordpress.api.model.PublishableStatus; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; public class WordpressPostOperationTest extends WordpressComponentTestSupport { diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressUserOperationTest.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressUserOperationTest.java index c1dc312..a830324 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressUserOperationTest.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/WordpressUserOperationTest.java @@ -19,9 +19,10 @@ package org.apache.camel.component.wordpress; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.mock.MockEndpoint; import org.apache.camel.component.wordpress.api.model.User; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; public class WordpressUserOperationTest extends WordpressComponentTestSupport { diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/model/PublishableStatusTest.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/model/PublishableStatusTest.java index a41193b..7fc9a6e 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/model/PublishableStatusTest.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/model/PublishableStatusTest.java @@ -16,10 +16,11 @@ */ package org.apache.camel.component.wordpress.api.model; -import org.junit.Test; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; public class PublishableStatusTest { @@ -32,18 +33,20 @@ public class PublishableStatusTest { assertThat(PublishableStatus.fromString(input2), is(PublishableStatus.private_)); } - @Test(expected = IllegalArgumentException.class) + @Test public void testFromStringEmpty() { final String input3 = ""; - assertThat(PublishableStatus.fromString(input3), is(PublishableStatus.private_)); + assertThrows(IllegalArgumentException.class, + () -> PublishableStatus.fromString(input3)); } - @Test(expected = NullPointerException.class) + @Test public void testFromStringNull() { final String input4 = null; - assertThat(PublishableStatus.fromString(input4), is(PublishableStatus.private_)); + assertThrows(NullPointerException.class, + () -> PublishableStatus.fromString(input4)); } } diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServicePostsAdapterTest.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServicePostsAdapterTest.java index 23699a3..86dc40e 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServicePostsAdapterTest.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServicePostsAdapterTest.java @@ -26,21 +26,21 @@ import org.apache.camel.component.wordpress.api.model.PostSearchCriteria; import org.apache.camel.component.wordpress.api.service.WordpressServicePosts; import org.apache.camel.component.wordpress.api.test.WordpressMockServerTestSupport; import org.apache.camel.component.wordpress.api.test.WordpressServerHttpRequestHandler; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.greaterThan; -import static org.junit.Assert.assertThat; public class WordpressServicePostsAdapterTest extends WordpressMockServerTestSupport { private static WordpressServicePosts servicePosts; - @BeforeClass + @BeforeAll public static void before() { servicePosts = serviceProvider.getService(WordpressServicePosts.class); servicePosts.setWordpressAuthentication(new WordpressBasicAuthentication(WordpressServerHttpRequestHandler.USERNAME, WordpressServerHttpRequestHandler.PASSWORD)); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServiceUsersAdapterTest.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServiceUsersAdapterTest.java index 9256db7..6a29dba 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServiceUsersAdapterTest.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/WordpressServiceUsersAdapterTest.java @@ -24,21 +24,21 @@ import org.apache.camel.component.wordpress.api.model.UserSearchCriteria; import org.apache.camel.component.wordpress.api.service.WordpressServiceUsers; import org.apache.camel.component.wordpress.api.test.WordpressMockServerTestSupport; import org.apache.camel.component.wordpress.api.test.WordpressServerHttpRequestHandler; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.greaterThan; -import static org.junit.Assert.assertThat; public class WordpressServiceUsersAdapterTest extends WordpressMockServerTestSupport { private static WordpressServiceUsers serviceUsers; - @BeforeClass + @BeforeAll public static void before() { serviceUsers = serviceProvider.getService(WordpressServiceUsers.class); serviceUsers.setWordpressAuthentication(new WordpressBasicAuthentication(WordpressServerHttpRequestHandler.USERNAME, WordpressServerHttpRequestHandler.PASSWORD)); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCategoriesAdapterIT.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCategoriesAdapterIT.java index 6712a99..aa0b191 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCategoriesAdapterIT.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCategoriesAdapterIT.java @@ -23,23 +23,23 @@ import org.apache.camel.component.wordpress.api.WordpressServiceProvider; import org.apache.camel.component.wordpress.api.model.Category; import org.apache.camel.component.wordpress.api.model.CategorySearchCriteria; import org.apache.camel.component.wordpress.api.service.WordpressServiceCategories; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.isEmptyOrNullString; -import static org.junit.Assert.assertThat; -@Ignore("Not implemented yet") +@Disabled("Not implemented yet") public class WordpressServiceCategoriesAdapterIT { private static WordpressServiceCategories serviceCategories; - @BeforeClass + @BeforeAll public static void before() { final WordpressServiceProvider serviceProvider = WordpressServiceProvider.getInstance(); serviceProvider.init(WordpressTestConstants.WORDPRESS_DEMO_URL); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCommentsAdapterIT.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCommentsAdapterIT.java index 624ca5d..5195f37 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCommentsAdapterIT.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceCommentsAdapterIT.java @@ -23,23 +23,23 @@ import org.apache.camel.component.wordpress.api.WordpressServiceProvider; import org.apache.camel.component.wordpress.api.model.Category; import org.apache.camel.component.wordpress.api.model.CategorySearchCriteria; import org.apache.camel.component.wordpress.api.service.WordpressServiceCategories; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.isEmptyOrNullString; -import static org.junit.Assert.assertThat; -@Ignore("Not implemented yet") +@Disabled("Not implemented yet") public class WordpressServiceCommentsAdapterIT { private static WordpressServiceCategories serviceCategories; - @BeforeClass + @BeforeAll public static void before() { final WordpressServiceProvider serviceProvider = WordpressServiceProvider.getInstance(); serviceProvider.init(WordpressTestConstants.WORDPRESS_DEMO_URL); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePagesAdapterIT.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePagesAdapterIT.java index 7db06a7..407d06e 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePagesAdapterIT.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePagesAdapterIT.java @@ -23,22 +23,22 @@ import org.apache.camel.component.wordpress.api.WordpressServiceProvider; import org.apache.camel.component.wordpress.api.model.Page; import org.apache.camel.component.wordpress.api.model.PageSearchCriteria; import org.apache.camel.component.wordpress.api.service.WordpressServicePages; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; -import static org.junit.Assert.assertThat; -@Ignore("Not implemented yet") +@Disabled("Not implemented yet") public class WordpressServicePagesAdapterIT { private static WordpressServicePages servicePages; - @BeforeClass + @BeforeAll public static void before() { final WordpressServiceProvider serviceProvider = WordpressServiceProvider.getInstance(); serviceProvider.init(WordpressTestConstants.WORDPRESS_DEMO_URL); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePostRevisionAdapterIT.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePostRevisionAdapterIT.java index e979a59..8663da0 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePostRevisionAdapterIT.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServicePostRevisionAdapterIT.java @@ -27,28 +27,28 @@ import org.apache.camel.component.wordpress.api.auth.WordpressBasicAuthenticatio import org.apache.camel.component.wordpress.api.model.PostRevision; import org.apache.camel.component.wordpress.api.service.WordpressServicePostRevision; import org.apache.camel.component.wordpress.api.test.WordpressMockServerTestSupport; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.notNullValue; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.greaterThan; -import static org.junit.Assert.assertThat; /* * TODO fix authentication problem (when implementing global authentication) * javax.ws.rs.NotAuthorizedException: HTTP 401 Unauthorized */ -@Ignore("Not implemented yet") +@Disabled("Not implemented yet") public class WordpressServicePostRevisionAdapterIT extends WordpressMockServerTestSupport { private static WordpressServicePostRevision servicePostRevision; - @BeforeClass + @BeforeAll public static void before() { final WordpressServiceProvider serviceProvider = WordpressServiceProvider.getInstance(); final WordpressAuthentication authentication = new WordpressBasicAuthentication("integration_test", "JD)e)Ox)z@HyDF*Dv4aWszm*"); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTagsAdapterIT.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTagsAdapterIT.java index 33301c8..346865b 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTagsAdapterIT.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTagsAdapterIT.java @@ -23,23 +23,23 @@ import org.apache.camel.component.wordpress.api.WordpressServiceProvider; import org.apache.camel.component.wordpress.api.model.Tag; import org.apache.camel.component.wordpress.api.model.TagSearchCriteria; import org.apache.camel.component.wordpress.api.service.WordpressServiceTags; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.emptyCollectionOf; import static org.hamcrest.Matchers.isEmptyOrNullString; -import static org.junit.Assert.assertThat; -@Ignore("Not implemented yet") +@Disabled("Not implemented yet") public class WordpressServiceTagsAdapterIT { private static WordpressServiceTags serviceTags; - @BeforeClass + @BeforeAll public static void before() { final WordpressServiceProvider serviceProvider = WordpressServiceProvider.getInstance(); serviceProvider.init(WordpressTestConstants.WORDPRESS_DEMO_URL); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTaxonomyAdapterIT.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTaxonomyAdapterIT.java index 72d7a25..02e667d 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTaxonomyAdapterIT.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/service/impl/ignored/WordpressServiceTaxonomyAdapterIT.java @@ -22,22 +22,22 @@ import org.apache.camel.component.wordpress.WordpressTestConstants; import org.apache.camel.component.wordpress.api.WordpressServiceProvider; import org.apache.camel.component.wordpress.api.model.Taxonomy; import org.apache.camel.component.wordpress.api.service.WordpressServiceTaxonomy; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.CoreMatchers.not; import static org.hamcrest.CoreMatchers.nullValue; +import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.isEmptyOrNullString; -import static org.junit.Assert.assertThat; -@Ignore("Not implemented yet") +@Disabled("Not implemented yet") public class WordpressServiceTaxonomyAdapterIT { private static WordpressServiceTaxonomy serviceTaxonomy; - @BeforeClass + @BeforeAll public static void before() { final WordpressServiceProvider serviceProvider = WordpressServiceProvider.getInstance(); serviceProvider.init(WordpressTestConstants.WORDPRESS_DEMO_URL); diff --git a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/test/WordpressMockServerTestSupport.java b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/test/WordpressMockServerTestSupport.java index c26f22c..711019d 100644 --- a/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/test/WordpressMockServerTestSupport.java +++ b/components/camel-wordpress/src/test/java/org/apache/camel/component/wordpress/api/test/WordpressMockServerTestSupport.java @@ -24,8 +24,8 @@ import java.util.Map; import org.apache.camel.component.wordpress.api.WordpressServiceProvider; import org.apache.http.impl.bootstrap.HttpServer; import org.apache.http.impl.bootstrap.ServerBootstrap; -import org.junit.AfterClass; -import org.junit.BeforeClass; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -41,7 +41,7 @@ public abstract class WordpressMockServerTestSupport { } - @BeforeClass + @BeforeAll public static void setUpMockServer() throws IOException { // @formatter:off int i = 0; @@ -89,7 +89,7 @@ public abstract class WordpressMockServerTestSupport { // @formatter:on } - @AfterClass + @AfterAll public static void tearDownMockServer() { LOGGER.info("Stopping local server"); if (localServer != null) {