You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2022/03/14 13:54:02 UTC

[isis] 02/02: ISIS-2974: adds overload for PojoTester

This is an automated email from the ASF dual-hosted git repository.

danhaywood pushed a commit to branch ISIS-2974
in repository https://gitbox.apache.org/repos/asf/isis.git

commit 2916df49c7fee0e979c02a78022c3321ef614662
Author: Dan Haywood <da...@haywood-associates.co.uk>
AuthorDate: Mon Mar 14 13:53:40 2022 +0000

    ISIS-2974: adds overload for PojoTester
---
 .../isis/testing/unittestsupport/applib/dom/pojo/PojoTester.java | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/testing/unittestsupport/applib/src/main/java/org/apache/isis/testing/unittestsupport/applib/dom/pojo/PojoTester.java b/testing/unittestsupport/applib/src/main/java/org/apache/isis/testing/unittestsupport/applib/dom/pojo/PojoTester.java
index 11e6032..fb88372 100644
--- a/testing/unittestsupport/applib/src/main/java/org/apache/isis/testing/unittestsupport/applib/dom/pojo/PojoTester.java
+++ b/testing/unittestsupport/applib/src/main/java/org/apache/isis/testing/unittestsupport/applib/dom/pojo/PojoTester.java
@@ -452,6 +452,15 @@ public class PojoTester {
 	}
 
 	/**
+	 * Convenience overload to provide a {@link DatumFactory} to the {@link PojoTester} for the specified
+	 * compile time type, also instantiatable as the runtime type (with a no-arg constructor).
+	 */
+	@lombok.SneakyThrows
+	public <T> PojoTester usingData(Class<T> compileTimeType) {
+		return usingData(compileTimeType, compileTimeType);
+	}
+
+	/**
 	 * Exercises all of the getters and setters of the provided bean, using the built-in {@link DatumFactory} and any
 	 * additional configured through previous calls to {@link #usingData(Class, Object[])} (or its overloads).
 	 */