From 4cf495a912c509cf0faae2c457264190fb90e93f Mon Sep 17 00:00:00 2001 From: Kalle Stenflo Date: Wed, 8 Oct 2014 15:01:47 +0200 Subject: [PATCH] Fixed failing test. --- .../java/com/jayway/jsonpath/EscapeTest.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/json-path/src/test/java/com/jayway/jsonpath/EscapeTest.java b/json-path/src/test/java/com/jayway/jsonpath/EscapeTest.java index d57baf68..a7c9d6f9 100644 --- a/json-path/src/test/java/com/jayway/jsonpath/EscapeTest.java +++ b/json-path/src/test/java/com/jayway/jsonpath/EscapeTest.java @@ -1,14 +1,35 @@ package com.jayway.jsonpath; +import net.minidev.json.JSONStyle; +import net.minidev.json.JSONValue; +import org.junit.AfterClass; +import org.junit.BeforeClass; import org.junit.Test; import static org.assertj.core.api.Assertions.assertThat; public class EscapeTest extends BaseTest { + private static JSONStyle style; + + @BeforeClass + public static void before(){ + style = JSONValue.COMPRESSION; + JSONValue.COMPRESSION = JSONStyle.LT_COMPRESS; + } + + @AfterClass + public static void after(){ + JSONValue.COMPRESSION = style; + } + @Test public void urls_are_not_escaped() { + JSONStyle orig = JSONValue.COMPRESSION; + + + String json = "[" + "\"https://a/b/1\"," + "\"https://a/b/2\"," +