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

commit 93a8c63590415167efbf963773b3f4adb21b9517
Author: Andi Huber <ahu...@apache.org>
AuthorDate: Fri Apr 13 07:49:50 2018 +0200

    ISIS-1841 replace Util with Java language idioms
---
 ...SpecificationValidatingInteractionMoreTest.java |  9 ++++-
 ...isfySpecificationValidatingInteractionTest.java | 15 ++++++--
 .../facets/propparam/specification/Utils.java      | 40 ----------------------
 3 files changed, 21 insertions(+), 43 deletions(-)

diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionMoreTest.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionMoreTest.java
index 58f1eb5..0f0f741 100644
--- 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionMoreTest.java
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionMoreTest.java
@@ -41,6 +41,8 @@ import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 
+import java.util.Collections;
+
 public class MustSatisfySpecificationValidatingInteractionMoreTest {
 
     @Rule
@@ -65,6 +67,7 @@ public class 
MustSatisfySpecificationValidatingInteractionMoreTest {
     private SpecificationRequiresFirstLetterToBeUpperCase 
requiresFirstLetterToBeUpperCase;
 
     public static class Customer {}
+    
     @Before
     public void setUp() throws Exception {
 
@@ -77,7 +80,11 @@ public class 
MustSatisfySpecificationValidatingInteractionMoreTest {
 
         requiresFirstLetterToBeUpperCase = new 
SpecificationRequiresFirstLetterToBeUpperCase();
 
-        facetForSpecificationFirstLetterUpperCase = new 
MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacet(Utils.listOf(requiresFirstLetterToBeUpperCase),
 identifiedHolder, mockServicesInjector);
+        facetForSpecificationFirstLetterUpperCase = 
+                       new 
MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacet(
+                                       
Collections.singletonList(requiresFirstLetterToBeUpperCase), 
+                                       identifiedHolder, 
+                                       mockServicesInjector);
 
         mockProposedObjectAdapter = context.mock(ObjectAdapter.class, 
"proposed");
     }
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionTest.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionTest.java
index 96fdfc1..93216ad 100644
--- 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionTest.java
+++ 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/MustSatisfySpecificationValidatingInteractionTest.java
@@ -41,6 +41,8 @@ import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.CoreMatchers.nullValue;
 import static org.junit.Assert.assertThat;
 
+import java.util.Collections;
+
 public class MustSatisfySpecificationValidatingInteractionTest {
 
     @Rule
@@ -79,8 +81,17 @@ public class 
MustSatisfySpecificationValidatingInteractionTest {
         specificationAlwaysSatisfied = new SpecificationAlwaysSatisfied();
         specificationNeverSatisfied = new SpecificationNeverSatisfied();
 
-        facetForSpecificationAlwaysSatisfied = new 
MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacet(Utils.listOf(specificationAlwaysSatisfied),
 identifiedHolder, mockServicesInjector);
-        facetForSpecificationNeverSatisfied = new 
MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacet(Utils.listOf(specificationNeverSatisfied),
 identifiedHolder, mockServicesInjector);
+        facetForSpecificationAlwaysSatisfied = 
+                       new 
MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacet(
+                                       
Collections.singletonList(specificationAlwaysSatisfied), 
+                                       identifiedHolder, 
+                                       mockServicesInjector);
+        
+        facetForSpecificationNeverSatisfied = 
+                       new 
MustSatisfySpecificationFromMustSatisfyAnnotationOnTypeFacet(
+                                       
Collections.singletonList(specificationNeverSatisfied), 
+                                       identifiedHolder, 
+                                       mockServicesInjector);
 
         mockProposedObjectAdapter = context.mock(ObjectAdapter.class, 
"proposed");
         mockProposedObject = context.mock(Object.class, "proposedObject");
diff --git 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/Utils.java
 
b/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/Utils.java
deleted file mode 100644
index 4ccea41..0000000
--- 
a/core/metamodel/src/test/java/org/apache/isis/core/metamodel/facets/propparam/specification/Utils.java
+++ /dev/null
@@ -1,40 +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.core.metamodel.facets.propparam.specification;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.isis.applib.spec.Specification;
-
-public final class Utils {
-
-    private Utils() {
-    }
-
-    
-    public static List<Specification> listOf(final Specification 
specification) {
-        return new ArrayList<Specification>() {
-            {
-                add(specification);
-            }
-        };
-    }
-}

-- 
To stop receiving notification emails like this one, please contact
ahu...@apache.org.

Reply via email to