commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (Jira)" <>
Subject [jira] [Work logged] (CSV-252) Upgrade test framework to JUnit 5 Jupiter
Date Sun, 06 Oct 2019 06:58:00 GMT


ASF GitHub Bot logged work on CSV-252:

                Author: ASF GitHub Bot
            Created on: 06/Oct/19 06:57
            Start Date: 06/Oct/19 06:57
    Worklog Time Spent: 10m 
      Work Description: mureinik commented on pull request #50: CSV-252: Clean up exception
   As a followup to commit e2f0a4d8a83a41eaa984086636a3712c682307ea that introduced JUnit
Jupiter to the project, this patch leverages the new `Assertions#assertThrows` method to clean
up tests for expected exceptions.
   Instead of the somewhat clunky structure common in JUnit 4 tests:
   try {
       fail("SomeException should be thrown");
   } catch (SomeException e) {
       // Expected...
       // Possibly some assertion on e
   JUnit Jupiter allows the following elegant syntax:
   SomeException e = assertThrows(SomeException.class, () -> someMethod());
   // Possibly some assertions on e
   In addition, redundant `throws` clauses in the test code were removed to make the code
more concise and easier to read
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.
For queries about this service, please contact Infrastructure at:

Issue Time Tracking

    Worklog Id:     (was: 324015)
    Time Spent: 50m  (was: 40m)

> Upgrade test framework to JUnit 5 Jupiter
> -----------------------------------------
>                 Key: CSV-252
>                 URL:
>             Project: Commons CSV
>          Issue Type: Task
>          Components: Build
>            Reporter: Allon Mureinik
>            Priority: Major
>          Time Spent: 50m
>  Remaining Estimate: 0h
> Commons CSV's tests use JUnit 4.12, which is a tad outdated.
> We should upgrade to the modern JUnit Jupiter and make it easier to write future tests. 

This message was sent by Atlassian Jira

View raw message