You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "terrymanu (via GitHub)" <gi...@apache.org> on 2023/02/26 03:09:09 UTC

[GitHub] [shardingsphere] terrymanu opened a new issue, #24350: Upgrade test framework from JUnit 4 to JUnit 5

terrymanu opened a new issue, #24350:
URL: https://github.com/apache/shardingsphere/issues/24350

   I want to upgrade the test framework from JUnit 4 to JUnit 5.
   
   The main changes include:
   
   1. Renaming the imported Assertions class.
   1. Refactoring assertXXX(message, xxx) to assertXXX(xxx, message).
   1. Refactoring @Test(expected = xxx) to assertThrows.
   1. Refactoring @Ignore to @Disabled.
   1. Refactoring @Before, @BeforeClass, @After, @AfterClass to @BeforeEach, @BeforeAll, @AfterEach, @AfterEach.
   1. Refactoring @Parameters to @ParameterizedTest and @ArgumentsSource.
   1. Refactoring @ClassRule and BlockJUnit4ClassRunner to BeforeAllCallback and AfterAllCallback.
   1. Refactoring @RunWith to @ExtendWith.
   
   Since the changes are significant, I plan to upgrade the test cases one by one. Until all the upgrades are completed, JUnit 4.x and JUnit 5.x can coexist.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] taojintianxia commented on issue #24350: Upgrade test framework from JUnit 4 to JUnit 5

Posted by "taojintianxia (via GitHub)" <gi...@apache.org>.
taojintianxia commented on issue #24350:
URL: https://github.com/apache/shardingsphere/issues/24350#issuecomment-1455742018

   @terrymanu besides `@ArgumentsSource` , there are `@CsvFileSource`、 `@MethodSource`、`@EnumSource` are also useful, please consider that.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] terrymanu closed issue #24350: Upgrade test framework from JUnit 4 to JUnit 5

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #24350: Upgrade test framework from JUnit 4 to JUnit 5
URL: https://github.com/apache/shardingsphere/issues/24350


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org