You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2021/06/22 09:23:15 UTC

[sling-org-apache-sling-graphql-core] branch master updated: Switch from deprecated assertThat

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

bdelacretaz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-graphql-core.git


The following commit(s) were added to refs/heads/master by this push:
     new 3e4884a  Switch from deprecated assertThat
3e4884a is described below

commit 3e4884ae1b4e2e2d98b42082f31ec0a5b5a02530
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Tue Jun 22 11:22:23 2021 +0200

    Switch from deprecated assertThat
---
 .../java/org/apache/sling/graphql/core/engine/CustomScalarsTest.java   | 3 +--
 .../org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java | 2 +-
 .../org/apache/sling/graphql/core/engine/IntrospectionQueryTest.java   | 2 +-
 .../apache/sling/graphql/core/engine/SlingDataFetcherSelectorTest.java | 2 +-
 .../sling/graphql/core/engine/SlingTypeResolverSelectorTest.java       | 2 +-
 src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java   | 2 +-
 .../org/apache/sling/graphql/core/schema/SchemaDescriptionsTest.java   | 2 +-
 7 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/src/test/java/org/apache/sling/graphql/core/engine/CustomScalarsTest.java b/src/test/java/org/apache/sling/graphql/core/engine/CustomScalarsTest.java
index f6ee26b..aed4b66 100644
--- a/src/test/java/org/apache/sling/graphql/core/engine/CustomScalarsTest.java
+++ b/src/test/java/org/apache/sling/graphql/core/engine/CustomScalarsTest.java
@@ -21,8 +21,7 @@ package org.apache.sling.graphql.core.engine;
 import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath;
 
 import static org.hamcrest.Matchers.is;
-import static org.junit.Assert.assertThat;
-import static org.junit.Assert.fail;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.hamcrest.Matchers.equalTo;
 
 import org.apache.sling.graphql.api.ScalarConversionException;
diff --git a/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java b/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
index 769f168..1d5e517 100644
--- a/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
+++ b/src/test/java/org/apache/sling/graphql/core/engine/DefaultQueryExecutorTest.java
@@ -58,11 +58,11 @@ import static org.hamcrest.Matchers.containsString;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.is;
 import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 
 public class DefaultQueryExecutorTest extends ResourceQueryTestBase {
diff --git a/src/test/java/org/apache/sling/graphql/core/engine/IntrospectionQueryTest.java b/src/test/java/org/apache/sling/graphql/core/engine/IntrospectionQueryTest.java
index 07c536c..59295ee 100644
--- a/src/test/java/org/apache/sling/graphql/core/engine/IntrospectionQueryTest.java
+++ b/src/test/java/org/apache/sling/graphql/core/engine/IntrospectionQueryTest.java
@@ -25,7 +25,7 @@ import java.util.List;
 
 import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath;
 
-import static org.junit.Assert.assertThat;
+import static org.hamcrest.MatcherAssert.assertThat;
 
 import org.apache.sling.graphql.core.mocks.EchoDataFetcher;
 import org.apache.sling.graphql.core.mocks.TestUtil;
diff --git a/src/test/java/org/apache/sling/graphql/core/engine/SlingDataFetcherSelectorTest.java b/src/test/java/org/apache/sling/graphql/core/engine/SlingDataFetcherSelectorTest.java
index 224b63c..4fd9a46 100644
--- a/src/test/java/org/apache/sling/graphql/core/engine/SlingDataFetcherSelectorTest.java
+++ b/src/test/java/org/apache/sling/graphql/core/engine/SlingDataFetcherSelectorTest.java
@@ -20,10 +20,10 @@ package org.apache.sling.graphql.core.engine;
 
 import static org.hamcrest.Matchers.not;
 import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.mock;
 
 import com.example.fetchers.DoNothingFetcher;
diff --git a/src/test/java/org/apache/sling/graphql/core/engine/SlingTypeResolverSelectorTest.java b/src/test/java/org/apache/sling/graphql/core/engine/SlingTypeResolverSelectorTest.java
index 6bcc5b2..10a4565 100644
--- a/src/test/java/org/apache/sling/graphql/core/engine/SlingTypeResolverSelectorTest.java
+++ b/src/test/java/org/apache/sling/graphql/core/engine/SlingTypeResolverSelectorTest.java
@@ -32,10 +32,10 @@ import com.example.resolvers.DoNothingTypeResolver;
 
 import static org.hamcrest.Matchers.not;
 import static org.hamcrest.Matchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertThat;
 import static org.mockito.Mockito.mock;
 
 public class SlingTypeResolverSelectorTest {
diff --git a/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java b/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java
index ccf1344..e434b63 100644
--- a/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java
+++ b/src/test/java/org/apache/sling/graphql/core/it/GraphQLServletIT.java
@@ -62,9 +62,9 @@ import org.osgi.framework.BundleContext;
 import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath;
 import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasNoJsonPath;
 import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
 import static org.ops4j.pax.exam.cm.ConfigurationAdminOptions.factoryConfiguration;
 
diff --git a/src/test/java/org/apache/sling/graphql/core/schema/SchemaDescriptionsTest.java b/src/test/java/org/apache/sling/graphql/core/schema/SchemaDescriptionsTest.java
index 576ee9d..a6b986f 100644
--- a/src/test/java/org/apache/sling/graphql/core/schema/SchemaDescriptionsTest.java
+++ b/src/test/java/org/apache/sling/graphql/core/schema/SchemaDescriptionsTest.java
@@ -46,8 +46,8 @@ import org.mockito.Mockito;
 import net.minidev.json.JSONArray;
 
 import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath;
+import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertThat;
 
 /**
  * Test the fields descriptions which are part of the schema as per