Skip to content

Releases: bvfalcon/junit5-extensions

0.5.0

07 Sep 13:52
Compare
Choose a tag to compare

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

30 Aug 17:19
Compare
Choose a tag to compare

Short form for annotations @CheckField, @CheckMethod, @CheckKey, @CheckKeys and @CheckResourceBundle added

0.4.1

13 Aug 14:38
Compare
Choose a tag to compare

FakeSMTP Extension removed (extracted into separate project JUnit5-FakeSMTP)

0.4.0

29 Jul 20:14
Compare
Choose a tag to compare

Added annotation @CheckSerializable:

  1. 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

26 Jul 18:05
Compare
Choose a tag to compare

Added annotations @CheckFields and @CheckKeys:

  1. 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.
  2. 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

22 Jul 20:50
Compare
Choose a tag to compare

FakeSMTP API improvements (direct access to MimeMessage)
Added annotations @CheckKey and @CheckResourceBundle for automate unit-testing of ResourceBundles:

  1. 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.
  2. 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

20 Jul 20:46
Compare
Choose a tag to compare

Added pluggable junit5-extension FakeSMTP with embedded lightweight local SMTP-Server (based on SubEtha SMTP)

0.1.2

15 Jul 17:30
Compare
Choose a tag to compare

Simplified dependencies names and their usage in your project: junit5-annotations with provided scope, junit5-tests with test scope.
Small code improvements

0.1.1

11 Jul 18:38
Compare
Choose a tag to compare

Basic functionality of check existence/accessability of fields/methods/constructors of java-classes:

  1. 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.
  2. 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.
  3. 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

11 Jul 18:25
Compare
Choose a tag to compare

Basic functionality of check existence/accessability of fields/methods/constructors of java-classes:

  1. 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.
  2. 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.
  3. 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.