commons-issues mailing list archives

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

     [ https://issues.apache.org/jira/browse/CSV-252?focusedWorklogId=324015&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-324015
]

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
handling
URL: https://github.com/apache/commons-csv/pull/50
 
 
   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:
   
   ```java
   try {
       someMethod();
       fail("SomeException should be thrown");
   } catch (SomeException e) {
       // Expected...
       // Possibly some assertion on e
   }
    ```
   
   JUnit Jupiter allows the following elegant syntax:
   
   ```java
   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:
users@infra.apache.org


Issue Time Tracking
-------------------

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

> Upgrade test framework to JUnit 5 Jupiter
> -----------------------------------------
>
>                 Key: CSV-252
>                 URL: https://issues.apache.org/jira/browse/CSV-252
>             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
(v8.3.4#803005)

Mime
View raw message