[SAK-39198] Upgrade jUnit to 4.7 Created: 06-Oct-2009  Updated: 25-Apr-2018  Resolved: 31-Jul-2010

Status: CLOSED
Project: Sakai
Component/s: Kernel
Affects Version/s: None
Fix Version/s: 2.8.x

Type: Bug Priority: Major
Reporter: Steve Swinsburg Assignee: Steve Swinsburg
Resolution: Incorporated Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Cloners
cloned as SAK-17125 Upgrade jUnit to 4.7 CLOSED
Relate
is related to SAK-38573 Upgrade to junit 4.8.1 CLOSED
Previous Issue Keys: SAK-17126, KNL-286

 Description   

The current version of jUnit in Sakai is 3.8.1. Please upgrade to 4.7

This brings valuable readable methods with it, like assertThat():

e.g.

assertThat(0, is(1)); // fails:
// failure message:
// expected: is <1>
// got value: <0>
assertThat(0, is(not(1))) // passes

assertThat("Help! Integers don't work", 0, is(1)); // fails:
// failure message:
// Help! Integers don't work
// expected: is <1>
// got value: <0>
assertThat("Zero is one", 0, is(not(1))) // passes



 Comments   
Comment by Stephen Marquard [ 27-Nov-2009 ]

Just upping the version in the root pom.xml to 4.7 creates 3 unit test failures.

If you'd like this updated in kernel, please attach a patch that has the pom.xml change and whatever changes are required to resolve the test failures.

Comment by David Horwitz [ 10-Dec-2009 ]

a note that this will be required to go the spring 3

Comment by Mustansar Mehmood [ 30-Jun-2010 ]

I wonder of there is a Jira out there for an upgrade to Spring 3.0 Since Migration to Tomcat 6.x seems to be on its way

Comment by David Horwitz [ 31-Jul-2010 ]

At least some of the failures are due to Class names with Test in them that aren't unit tests (their mock objects)

Comment by David Horwitz [ 31-Jul-2010 ]

see KNL-535 - upgraded to junit 4.8.2

Generated at Mon Sep 16 16:38:10 CDT 2019 using Jira 8.0.3#800011-sha1:073e8b433c2c0e389c609c14a045ffa7abaca10d.