All notable changes to Cirneco project will be documented in this file. This project adheres to Semantic Versioning.
- Added a matcher for exceptions with messages:
it.ozimov.cirneco.hamcrest.java7.throwable.ExpectedException
. It should be used in JUnitExpectedException
's cause check.
- Added a matcher for UUID
it.ozimov.cirneco.hamcrest.java7.javautils.IsUUID
. - Added new module for Mockito with a captor for results (see
it.ozimov.mockito.helpers.captors.ResultCaptor
)
- Performance changes to
it.ozimov.cirneco.hamcrest.java7.collect.IsIterableContained
.
-
Added matcher to verify if an
Iterable
is contained with elements repetitions in another. The matcher iscontainedIn
from classit.ozimov.cirneco.hamcrest.java7.collect.IsIterableContained
. -
Added matcher to verify if an
Iterable
is subset of another. The matcher issubsetOf
from classit.ozimov.cirneco.hamcrest.java7.collect.IsSubsetOfIterable
. -
Added matcher to verify if two
Iterable
instances have the same size. The matcher issameSizeOf
from classit.ozimov.cirneco.hamcrest.java7.collect.IsIterableWithSameSizeTest
.
- In
AssertFluently
, methodbecause
can now be called before methodgiven
.
- In
IsSimilar
, methodisSimilar
has been renamed insimilar
.
- In
AssertFluently
, methodwithReason
has been renamed inbecause
to make the assertion more easy-to-read. This introduced a backward incompatibility.
- Added matcher
IsSimilar
, that calculates the Levenshtein distance between two String objects to assert for similarity.
- Possibility to provide a formatted string and the actual parameters in
message based methods from
AssertFluently
. - New
fail()
andsuccess()
methods inAssertFluently
to ensure consistency (e.g. in code quality, when an assertion needs to be called in a unit test).
- Added matcher to check if runtime annotations are present. The matcher is
hasRuntimeAnnotation
from classit.ozimov.cirneco.hamcrest.java7.clazz.IsClassWithAnnotation
.
-
Inheritance from Hamcrest matchers. Now
it.ozimov.cirneco.hamcrest.java7.Matchers
will just focus on new matchers and those overridden from Hamcrest. -
Class
it.ozimov.cirneco.hamcrest.java8.base.OptionalMatcher
is not renamed intoit.ozimov.cirneco.hamcrest.java8.base.IsPresentOptionalAnd
- Added matcher
presentAnd()
in classit.ozimov.cirneco.hamcrest.java8.base.OptionalMatcher
- Added matcher
hasToStringContainingInOrder()
in classit.ozimov.cirneco.hamcrest.java7.base.HasToStringContaining
,
- Fixed
given()
in classAssertFluently
, it now accepts null
- New matcher in package
it.ozimov.cirneco.hamcrest.java7.clazz
, i.e. classIsValidNoArgumentConstructor
.
- The
yaml()
matcher is exposed inJ7Matchers
class
- Assertion to check if a string is a YAML text in package
it.ozimov.cirneco.hamcrest.java7.filetype
, i.e.IsYaml
- Cleanup
- Json Matchers removed. Those from JayWay
json-path-assert
are enough
- Fluent assertions in class
it.ozimov.cirneco.hamcrest.java7.AssertFluently
- New matcher in package
it.ozimov.cirneco.hamcrest.java7.base
, i.e.IsSameHashcode
- New matchers in package
it.ozimov.cirneco.hamcrest.java7.web
, i.e.IsJSON
andIsJSONWith
. The latter is fully based on JayWay JsonPath library.
- Fixed mismatch description in
it.ozimov.cirneco.hamcrest.guava.collect.IsMultimapWithKeySet
- Fixed mismatch description in
it.ozimov.cirneco.hamcrest.java7.collect.IsMapWithSameKeySet
- Fixed unit tests for dates (wrong conversion from Joda
DateTime
tojava.util.Date
- Added Hamcrest matchers in
J7Matchers
- Extended matchers
IsIterableContainingInAnyOrder
,IsIterableContainingInOrder
andIsIterableContainingInRelativeOrder
- Imported
hamcrest-java 2.0.0.0
instead ofhamcrest-library 1.3
- Removed old modules and created three new ones (for Google Guava, JDK7 and JDK8), with artifact id:
-
java7-hamcrest-matchers
that replaces module with artifactcirneco-matchers-jdk7
-guava-hamcrest-matchers
that extract matchers from module with artifactcirneco-matchers-jdk7
-java8-hamcrest-matchers
that replaces module with artifactcirneco-matchers-jdk8
- Guava matchers are now in module with artifact
guava-hamcrest-matchers
- Package is now in the form
it.ozimov.cirneco.hamcrest.$MODULE$
, where$MODULE$
isguava
,java7
orjava8
, respectively for Google Guava, JDK7 and JDK8 matchers. - Classes in packages
it.ozimov.cirneco.hamcrest.iterable
andit.ozimov.cirneco.hamcrest.map
are now in packageit.ozimov.cirneco.hamcrest.$MODULE$.collect
, where$MODULE$
isguava
orjava7
- Matchers are grouped and exposed in classes
it.ozimov.cirneco.hamcrest.guava.GuavaMatchers
it.ozimov.cirneco.hamcrest.java7.J7Matchers
andit.ozimov.cirneco.hamcrest.java8.J8Matchers
respectively for modules with artifacts
- New matcher in package
it.ozimov.cirneco.hamcrest.iterable
, i.e.IsIterableWithDistinctElements
- New matcher in package
it.ozimov.cirneco.hamcrest.date
, i.e.IsDateWithInWeekOfYear
- New matchers in package
it.ozimov.cirneco.hamcrest.number
, i.e.IsPositive
andIsNegative
to match positive and negative numbers, respectively. - Updated class
it.ozimov.cirneco.hamcrest.CirnecoMatchersJ7
to expose the new matchers. - Minor refactoring in unit tests.
- Script for JavaDoc release.
- JavaDoc website on GitHub Pages.
- Release script to use ASCII art and JavaDoc release script.
- Minor fixes in the JavaDoc.
- Fix typos in description and mismatch description of
IsInfinity
matcher. - Update outdated unreleased diff link.
- New matchers in package
it.ozimov.cirneco.hamcrest.base
:- For JDK7:
IsBetween
,IsBetweenInclusive
,IsBetweenLowerBoundInclusive
,IsBetweenUpperBoundInclusive
,IsEmptyGuavaOptional
,IsEquivalent
,IsSame
; - For JDK8:
IsEmptyOptional
.
- For JDK7:
- New matchers in package
it.ozimov.cirneco.hamcrest.date
:- For JDK7:
IsDate
,IsDateInDay
,IsDateInLeapYear
,IsDateInMonth
,IsDateWithTime
.
- For JDK7:
- New matchers in package
it.ozimov.cirneco.hamcrest.iterable
:- For JDK7:
IsEmptyIterable
,IsIterableWithSize
,IsMultisetElementWithCount
,IsSortedIterable
,IsSortedIterableWithComparator
;
- For JDK7:
- New matchers in package
it.ozimov.cirneco.hamcrest.map
:- For JDK7:
IsMapWithSameKeySet
,IsMultimapKeyWithCollectionSize
,IsMultimapWithKeySet
,IsMultimapWithKeySetSize
;
- For JDK7:
- New matchers in package
it.ozimov.cirneco.hamcrest.number
:- For JDK7:
IsInfinity
,IsNegativeInfinity
,IsPositiveInfinity
,IsNotANumber
;
- For JDK7:
- New matchers in package
it.ozimov.cirneco.hamcrest.web
:- For JDK7:
IsEmail
;
- For JDK7:
- For JDK7
it.ozimov.cirneco.hamcrest.CirnecoMatchersJ7
groups all the matchers together. - For JDK8
it.ozimov.cirneco.hamcrest.CirnecoMatchersJ8
groups all the matchers together.