Skip to content

Releases: TNG/value-provider

v1.5.0

23 Jan 14:17

Choose a tag to compare

Extend collection generation to support Maps

The support for generation of Lists and Sets as introduced with v1.4.0 has been extended to Maps. Please refer to the CollectionGenerator.mapOf() method's Javadoc for details.

Ensure compatibility of the JUnit 5 infrastructure (i.e. ValueProviderExtension) with JUnit 6

The JUnit 5 infrastructure to reproduce seed values in case of test failures (i.e. ValueProviderExtension) has been verified successfully against JUnit 6.

MavenCentral: value-provider

v1.4.3

19 Nov 12:24

Choose a tag to compare

Avoid leading zeros in octets of IPv4 addresses created via ValueProvider.ipV4Address(). Thanks to @jgosmann for providing this fix.

Ensure compatibility with Java 25.

MavenCentral: value-provider

v1.4.2

26 Aug 06:43

Choose a tag to compare

Remove unnecessary transitive dependency Apache commons-lang3.

MavenCentral: value-provider

v1.4.1

18 Aug 11:45

Choose a tag to compare

Update dependencies to more current versions.

MavenCentral: value-provider

v1.4.0

04 Apr 13:21

Choose a tag to compare

Enhanced collection generation

The typical generation of a collection of sub-objects including a prefix to differentiate string properties used to look as follows:

  public static OrderBuilder createOrderBuilder(ValueProvider values) {
      OrderBuilder builder = Order.builder()
              ...
      addItems(builder, values);
      ...
      return builder;
  }

  private static void addItems(OrderBuilder builder, ValueProvider values) {
      int numOrderItems = values.intNumber(1, 5);
      for (int i = 0; i < numOrderItems; i++) {
          char prefix = (char) ('A' + i);
          ValueProvider prefixedProvider = values.copyWithChangedPrefix(prefix + "-");
          builder.orderItem(createOrderItem(prefixedProvider));
      }
  }

This is now eased and streamlined via the following fluent API, starting with the ValueProvider.collection() method:

  public static OrderBuilder createOrderBuilder(ValueProvider values) {
      OrderBuilder builder = Order.builder()
              ...
              .orderItems(createItems(values))
              ...
      ...
      return builder;
  }

  private static List<OrderItem> createItems(ValueProvider values) {
      return values.collection()
              .numElements(1, 5)
              .replacePrefixVia(i -> format("%c-", (char) ('A' + i)))
              .listOf(OrderItemTestDataFactory::createOrderItem);
  }

In addition to the existing ValueProvider.listOf() methods, respective setOf() are now available for convenience.

MavenCentral: value-provider

v1.3.0

21 Dec 16:04

Choose a tag to compare

Enhance ValueProviderExtension. Add support for

MavenCentral: value-provider

v1.2.3

26 Jun 13:05

Choose a tag to compare

Add methods for creation of (thank you @VinzenzMaennig)

  • LocalDate: localDateBetweenYears(), localDateBetween(), localDateInPast(), localDateInFuture()
  • LocalDateTime: localDateTimeBetween()
  • Duration: duration()
  • BigDecimal: bigDecimalPercentage()
  • Optional: optionalOf()

Allow public access to getPrefix() and getSuffix() methods of AbstractValueProvider.

MavenCentral: value-provider

v1.2.2

22 Feb 10:37

Choose a tag to compare

Update dependencies to current versions.

MavenCentral: value-provider

v1.2.1

11 Aug 12:02

Choose a tag to compare

Fix behaviour of BigInteger-/BigDecimal generating methods:

  • The numbers generated via positiveBigIntegerNumber() are no longer limited to Long.MAX_VALUE
  • The precision (scale) of numbers generated via positiveBigDecimalNumber() is no longer limited to double capabilities

Generalize byteArray() method, remove restriction to (bytes of) lowercase characters.

MavenCentral: value-provider

v1.2.0

20 Jul 05:10

Choose a tag to compare

Fix type issues for custom ValueProvider classes in conjunction with the listOf() methods.

  • custom ValueProvider classes should now derive from the newly introduced AbstractValueProvider rather than from ValueProvider
  • listOf()methods now work properly with custom ValueProvider classes
  • the copyWithChangedPrefix method was changed to an instance method to return the derived type (the static predecessor is still available for compatibility but deprecated)

Fix possible exception in localTimemethod

See README for further details.

MavenCentral: value-provider