A full summary of commits between 4.9 and 4.10 is on github
junit-dep-4.9.jar incorrectly contained hamcrest classes, which could lead to version conflicts in projects that depend on hamcrest directly. This is fixed in 4.10 [@dsaff, closing gh-309]
The RuleChain rule allows ordering of TestRules:
public static class UseRuleChain {
@Rule
public TestRule chain= RuleChain
.outerRule(new LoggingRule("outer rule")
.around(new LoggingRule("middle rule")
.around(new LoggingRule("inner rule");
@Test
public void example() {
assertTrue(true);
}
}
writes the log
starting outer rule
starting middle rule
starting inner rule
finished inner rule
finished middle rule
finished outer rule
TemporaryFolder#newFolder(String... folderNames)
creates recursively deep temporary folders
[@rodolfoliviero, closing gh-283]TemporaryFolder#newFile()
creates a randomly named new file, and #newFolder()
creates a randomly named new folder
[@Daniel Rothmaler, closing gh-299]The Theories
runner does not anticipate theory parameters that have generic
types, as reported by github#64. Fixing this won't happen until Theories
is
moved to junit-contrib. In anticipation of this, 4.9.1 adds some of the
necessary machinery to the runner classes, and deprecates a method that only
the Theories
runner uses, FrameworkMethod
#producesType().
The Common Public License that JUnit is released under is now included
in the source repository.
Thanks to @pholser
for identifying a potential resolution for github#64
and initiating work on it.
@Category
annotations
[@dsaff, fixing gh-291]ErrorCollector.checkThat
overload, that allows you to specify a reason [@drothmaler, closing gh-300]