You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@causeway.apache.org by ah...@apache.org on 2026/04/11 10:26:03 UTC
(causeway) branch 3991-record.introspect updated: CAUSEWAY-3991: test fix
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch 3991-record.introspect
in repository https://gitbox.apache.org/repos/asf/causeway.git
The following commit(s) were added to refs/heads/3991-record.introspect by this push:
new cc36f86589b CAUSEWAY-3991: test fix
cc36f86589b is described below
commit cc36f86589b532e2ede7052f82e424100118f9c1
Author: andi-huber <ah...@apache.org>
AuthorDate: Sat Apr 11 12:25:55 2026 +0200
CAUSEWAY-3991: test fix
---
.../testdomain/model/bad/OrphanedMemberSupportDetection.java | 7 +------
.../testdomain/domainmodel/DomainModelTest_usingBadDomain.java | 9 ++++++++-
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/regressiontests/base/src/main/java/org/apache/causeway/testdomain/model/bad/OrphanedMemberSupportDetection.java b/regressiontests/base/src/main/java/org/apache/causeway/testdomain/model/bad/OrphanedMemberSupportDetection.java
index 2ea0a0978ea..b27b8b9c23d 100644
--- a/regressiontests/base/src/main/java/org/apache/causeway/testdomain/model/bad/OrphanedMemberSupportDetection.java
+++ b/regressiontests/base/src/main/java/org/apache/causeway/testdomain/model/bad/OrphanedMemberSupportDetection.java
@@ -43,12 +43,7 @@ public static class WhenAnnotationOptional
introspection = Introspection.ANNOTATION_REQUIRED)
public static class WhenAnnotationRequired
extends MemberDetection.PublicBase {
-
- // expected to produce orphans for ...
-
- // void placeOrder(final String x, final String y) {}
- // @Getter @Setter String email;
- // @Getter @Setter java.util.Collection<String> orders;
+ // no orphans expected - non annotated methods are simply ignored (removed from the pool of candidates)
}
@DomainObject(
diff --git a/regressiontests/domainmodel/src/test/java/org/apache/causeway/testdomain/domainmodel/DomainModelTest_usingBadDomain.java b/regressiontests/domainmodel/src/test/java/org/apache/causeway/testdomain/domainmodel/DomainModelTest_usingBadDomain.java
index ce06b40c0cd..234c3d6cd97 100644
--- a/regressiontests/domainmodel/src/test/java/org/apache/causeway/testdomain/domainmodel/DomainModelTest_usingBadDomain.java
+++ b/regressiontests/domainmodel/src/test/java/org/apache/causeway/testdomain/domainmodel/DomainModelTest_usingBadDomain.java
@@ -292,13 +292,20 @@ void validDomainObjectOnInterface_shouldNotFail() {
@ParameterizedTest
@ValueSource(classes = {
OrphanedMemberSupportDetection.WhenEncapsulationEnabled.class,
-//FIXME OrphanedMemberSupportDetection.WhenAnnotationRequired.class,
+ OrphanedMemberSupportDetection.WhenAnnotationRequired.class,
OrphanedMemberSupportDetection.WhenAnnotationOptional.class
})
void orphanedMemberSupportDiscovery(final Class<?> classUnderTest) {
var clsIdUnderTest = Identifier.classIdentifier(LogicalType.fqcn(classUnderTest));
+ if(classUnderTest == OrphanedMemberSupportDetection.WhenAnnotationRequired.class) {
+ // no orphans expected - non annotated methods are simply ignored (removed from the pool of candidates)
+ validator.assertValid(
+ Identifier.classIdentifier(LogicalType.fqcn(InvalidDomainObjectOnInterface.Good.class)));
+ return;
+ }
+
// namedPlaceOrder(): String = "my name"
validator.assertAnyFailuresContaining(clsIdUnderTest, "namedPlaceOrder");