You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by ah...@apache.org on 2022/08/14 08:10:30 UTC
[isis] branch master updated: ISIS-2297: minor: pom cleanup; test cleanup
This is an automated email from the ASF dual-hosted git repository.
ahuber pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/isis.git
The following commit(s) were added to refs/heads/master by this push:
new 42c49d5a08 ISIS-2297: minor: pom cleanup; test cleanup
42c49d5a08 is described below
commit 42c49d5a083c35e55705809cf3e0a1fed16f8318
Author: andi-huber <ah...@apache.org>
AuthorDate: Sun Aug 14 10:10:19 2022 +0200
ISIS-2297: minor: pom cleanup; test cleanup
---
.../DomainModelTest_usingBadDomain.java | 48 +++++++----------
.../model/bad/InvalidLogicalTypeNameClash.java | 60 ----------------------
tooling/dsl/pom.xml | 2 -
3 files changed, 18 insertions(+), 92 deletions(-)
diff --git a/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingBadDomain.java b/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingBadDomain.java
index 09e698a575..2dabf8b864 100644
--- a/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingBadDomain.java
+++ b/regressiontests/stable-domainmodel/src/test/java/org/apache/isis/testdomain/domainmodel/DomainModelTest_usingBadDomain.java
@@ -19,7 +19,6 @@
package org.apache.isis.testdomain.domainmodel;
import java.lang.annotation.Annotation;
-import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.inject.Inject;
@@ -34,9 +33,6 @@ import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
-import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
-
import org.apache.isis.applib.Identifier;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.ActionLayout;
@@ -47,7 +43,6 @@ import org.apache.isis.applib.annotation.PropertyLayout;
import org.apache.isis.applib.exceptions.unrecoverable.DomainModelException;
import org.apache.isis.applib.id.LogicalType;
import org.apache.isis.applib.services.iactnlayer.InteractionService;
-import org.apache.isis.commons.collections.Can;
import org.apache.isis.core.config.IsisConfiguration;
import org.apache.isis.core.config.environment.IsisSystemEnvironment;
import org.apache.isis.core.config.metamodel.specloader.IntrospectionMode;
@@ -73,6 +68,9 @@ import org.apache.isis.testdomain.model.bad.OrphanedMemberSupportDetection;
import org.apache.isis.testdomain.util.interaction.DomainObjectTesterFactory;
import org.apache.isis.testing.integtestsupport.applib.validate.DomainModelValidator;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
import lombok.val;
@SpringBootTest(
@@ -218,34 +216,24 @@ class DomainModelTest_usingBadDomain {
"isActive()"));
}
-// @Test
-// void logicalTypeNameClash_shouldFail() {
-// assertLogicalTypeNameClashesAmong(Can.of(
-// InvalidLogicalTypeNameClash.VariantA.class,
-// InvalidLogicalTypeNameClash.VariantB.class
+ // since use of @Named annotation, entirely guarded by Spring ...
+// private void assertLogicalTypeNameClashesAmong(final Can<Class<?>> types) {
//
-// //FIXME ISIS-2871 for some reason the value type c does not get considered
-// //,InvalidLogicalTypeNameClash.VariantC.class
-// ));
+// val typeLiteralList = types.stream()
+// .map(t->t.getName())
+// .collect(Collectors.joining(", "));
+//
+// val classIdentifiers = types.stream()
+// .map(t->Identifier.classIdentifier(LogicalType.fqcn(t)))
+// .collect(Can.toCan());
+//
+// validator.assertAnyOfContainingAnyFailures(
+// classIdentifiers,
+// "Logical type name 'isis.testdomain.InvalidLogicalTypeNameClash' "
+// + "mapped to multiple non-abstract classes:\n"
+// + typeLiteralList);
// }
- private void assertLogicalTypeNameClashesAmong(final Can<Class<?>> types) {
-
- val typeLiteralList = types.stream()
- .map(t->t.getName())
- .collect(Collectors.joining(", "));
-
- val classIdentifiers = types.stream()
- .map(t->Identifier.classIdentifier(LogicalType.fqcn(t)))
- .collect(Can.toCan());
-
- validator.assertAnyOfContainingAnyFailures(
- classIdentifiers,
- "Logical type name 'isis.testdomain.InvalidLogicalTypeNameClash' "
- + "mapped to multiple non-abstract classes:\n"
- + typeLiteralList);
- }
-
@Test
void contradictingTypeSemantics_shouldFailValidation() {
validator.assertAnyFailuresContaining(
diff --git a/regressiontests/stable/src/main/java/org/apache/isis/testdomain/model/bad/InvalidLogicalTypeNameClash.java b/regressiontests/stable/src/main/java/org/apache/isis/testdomain/model/bad/InvalidLogicalTypeNameClash.java
deleted file mode 100644
index a23abb3f4c..0000000000
--- a/regressiontests/stable/src/main/java/org/apache/isis/testdomain/model/bad/InvalidLogicalTypeNameClash.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.isis.testdomain.model.bad;
-
-import org.apache.isis.applib.annotation.Action;
-import org.apache.isis.applib.annotation.DomainObject;
-import org.apache.isis.applib.annotation.Nature;
-import org.apache.isis.applib.annotation.Value;
-
-//TODO this is now captured by Spring - it fails early; remove eventually
-class InvalidLogicalTypeNameClash {
-
- // logical type name clash: should fail validation
- //@Named("isis.testdomain.InvalidLogicalTypeNameClash")
- @DomainObject(nature = Nature.VIEW_MODEL)
- private static class VariantA {
-
- @Action
- public boolean anAction() {
- return false;
- }
-
- }
-
- // logical type name clash: should fail validation
- //@Named("isis.testdomain.InvalidLogicalTypeNameClash")
- @DomainObject(nature = Nature.VIEW_MODEL)
- private static class VariantB {
-
- @Action
- public boolean anAction() {
- return false;
- }
-
- }
-
- // logical type name clash: should fail validation
- //@Named("isis.testdomain.InvalidLogicalTypeNameClash")
- @Value
- private static class VariantC {
-
- }
-
-}
diff --git a/tooling/dsl/pom.xml b/tooling/dsl/pom.xml
index 151a071322..48ee241112 100644
--- a/tooling/dsl/pom.xml
+++ b/tooling/dsl/pom.xml
@@ -28,7 +28,6 @@
</description>
<properties>
- <graphql-java.version>19.1</graphql-java.version>
<javapoet.version>1.13.0</javapoet.version>
<skipTests>true</skipTests>
<enforcer.skip>true</enforcer.skip>
@@ -46,7 +45,6 @@
<dependency>
<groupId>com.graphql-java</groupId>
<artifactId>graphql-java</artifactId>
- <version>${graphql-java.version}</version>
</dependency>
<!-- JAVA META PROGRAMMING -->