Releases: bvfalcon/junit5-extensions
0.5.0
Added annotation @ParameterizedConstructor
, with help of which parameters to constructor can be passed. The usage of @ParameterizedConstructor
is absolute equivalent to standard JUnit 5 annotation @ParameterizedTest
.
Also supported (and at least one required) @*Source
-annotations: @ValueSource
, @MethodSource
, @EnumSource
, @EmptySource
and @NullSource
for defining source of constructors parameters.
Classes used @ParameterizedConstructor
must be defined with modifier abstract
and can contain one or more methods annotated with @Test
.
Standard JUnit 5 annotations @Disabled
, @TestInstance
, @BeforeAll
, @BeforeEach
, @AfterEach
and @AfterAll
are supported.
0.4.2
0.4.1
FakeSMTP Extension removed (extracted into separate project JUnit5-FakeSMTP)
0.4.0
Added annotation @CheckSerializable
:
- Annotation
@CheckSerializable
with parameters:
a)targetPackage
- optional parameter, java package to check
b)excludes
- optional parameter, classes to exclude
c)message
- optional parameter, custom message for AssertionError.
0.3.1
Added annotations @CheckFields
and @CheckKeys
:
- Annotation
@CheckFields
with parameters:
a)targetClass
- required parameter, java class to check
b)values
- required parameter, fields names for check
c)message
- optional parameter, custom message for AssertionError. - Annotation
@CheckKeys
with parameters:
a)baseName
- required parameter, base name of ResourceBundle
b)values
- required parameter, keys names in resource bundle to check
c)locale
- optional parameter, default locale if standard not exists
d)message
- optional parameter, custom message for AssertionError.
0.3.0
FakeSMTP API improvements (direct access to MimeMessage)
Added annotations @CheckKey
and @CheckResourceBundle
for automate unit-testing of ResourceBundles:
- Annotation
@CheckKey
with parameters:
a)baseName
- required parameter, base name of ResourceBundle
b)value
- required parameter, key name in resource bundle
c)locale
- optional parameter, default locale if standard not exists
d)message
- optional parameter, custom message for AssertionError. - Annotation
@CheckResourceBundle
with parameters:
a)baseName
- required parameter, base name of ResourceBundle
b)locales
- required parameter, array of locales to check
c)message
- optional parameter, custom message for AssertionError.
0.2.0
Added pluggable junit5-extension FakeSMTP with embedded lightweight local SMTP-Server (based on SubEtha SMTP)
0.1.2
0.1.1
Basic functionality of check existence/accessability of fields/methods/constructors of java-classes:
- Annotation
@CheckConstructor
with parameters:
a)targetClass
- required parameter, java class to check
b)parameters
- optional parameter, array of Classes - arguments of constructors
c)message
- optional parameter, custom message for AssertionError. - Annotation
@CheckField
with parameters:
a)targetClass
- required parameter, java class to check
b)value
- required parameter, name of field for check
c)type
- optional parameter, Class of field to check (added in 0.1.1)
d)message
- optional parameter, custom message for AssertionError. - Annotation
@CheckMethod
with parameters:
a)targetClass
- required parameter, java class to check
b)value
- required parameter, name of method for check
c)returnType
- optional parameter, Class of returned value of method (before 0.1.1 - required parameter)
d)parameters
- optional parameter, array of Classes - arguments of method
e)message
- optional parameter, custom message for AssertionError.
All annotations and their combinations can be used to annotate classes, interfaces, enums, constructors, fields and methods.
All annotations are RetentionPolicy.SOURCE, used by compiler and not needed/make no sense at runtime.
0.1.0
Basic functionality of check existence/accessability of fields/methods/constructors of java-classes:
- Annotation
@CheckConstructor
with parameters:
a)targetClass
- required parameter, java class to check
b)parameters
- optional parameter, array of Classes - arguments of constructors
c)message
- optional parameter, custom message for AssertionError. - Annotation
@CheckField
with parameters:
a)targetClass
- required parameter, java class to check
b)value
- required parameter, name of field for check
c)message
- optional parameter, custom message for AssertionError. - Annotation
@CheckMethod
with parameters:
a)targetClass
- required parameter, java class to check
b)value
- required parameter, name of method for check
c)returnType
- required parameter, Class of returned value of method
d)parameters
- optional parameter, array of Classes - arguments of method
e)message
- optional parameter, custom message for AssertionError.
All annotations and their combinations can be used to annotate classes, interfaces, enums, constructors, fields and methods.