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 2020/05/06 14:22:18 UTC

[sling-whiteboard] branch master updated: cleanup

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-whiteboard.git


The following commit(s) were added to refs/heads/master by this push:
     new eb6b9fe  cleanup
eb6b9fe is described below

commit eb6b9fe61bf1ef66ac13e649e959222c47bac93e
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Wed May 6 16:21:22 2020 +0200

    cleanup
---
 .../scripting/gql/engine/GraphQLResourceQueryTest.java      | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/graphql-scripting/src/test/java/org/apache/sling/scripting/gql/engine/GraphQLResourceQueryTest.java b/graphql-scripting/src/test/java/org/apache/sling/scripting/gql/engine/GraphQLResourceQueryTest.java
index 7716788..676a416 100644
--- a/graphql-scripting/src/test/java/org/apache/sling/scripting/gql/engine/GraphQLResourceQueryTest.java
+++ b/graphql-scripting/src/test/java/org/apache/sling/scripting/gql/engine/GraphQLResourceQueryTest.java
@@ -20,10 +20,8 @@ package org.apache.sling.scripting.gql.engine;
 
 import static com.jayway.jsonpath.matchers.JsonPathMatchers.hasJsonPath;
 
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertThat;
 import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
 
 import static org.hamcrest.Matchers.equalTo;
 
@@ -79,16 +77,15 @@ public class GraphQLResourceQueryTest {
     @Test
     public void digestFieldsTest() throws Exception {
         final String json = queryJSON("{ currentResource { path pathMD5 pathSHA256 resourceTypeMD5 } }");
-        assertThat(json, hasJsonPath("$.data.currentResource"));
-        assertThat(json, hasJsonPath("$.data.currentResource.path", equalTo(resource.getPath())));
 
         final String pathMD5 = MockDataFetcherSelector.computeDigest("md5", resource.getPath());
-        assertThat(json, hasJsonPath("$.data.currentResource.pathMD5", equalTo("md5#path#" + pathMD5)));
-
         final String pathSHA256 = MockDataFetcherSelector.computeDigest("sha-256", resource.getPath());
-        assertThat(json, hasJsonPath("$.data.currentResource.pathSHA256", equalTo("sha-256#path#" + pathSHA256)));
-
         final String resourceTypeMD5 = MockDataFetcherSelector.computeDigest("md5", resource.getResourceType());
+
+        assertThat(json, hasJsonPath("$.data.currentResource"));
+        assertThat(json, hasJsonPath("$.data.currentResource.path", equalTo(resource.getPath())));
+        assertThat(json, hasJsonPath("$.data.currentResource.pathMD5", equalTo("md5#path#" + pathMD5)));
+        assertThat(json, hasJsonPath("$.data.currentResource.pathSHA256", equalTo("sha-256#path#" + pathSHA256)));
         assertThat(json, hasJsonPath("$.data.currentResource.resourceTypeMD5", equalTo("md5#resourceType#" + resourceTypeMD5)));
     }
 }