aboutsummaryrefslogtreecommitdiff
path: root/gson/src/test/java/com/google/gson/functional/LeniencyTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'gson/src/test/java/com/google/gson/functional/LeniencyTest.java')
-rw-r--r--gson/src/test/java/com/google/gson/functional/LeniencyTest.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/gson/src/test/java/com/google/gson/functional/LeniencyTest.java b/gson/src/test/java/com/google/gson/functional/LeniencyTest.java
index 6b5375e4..cde0e344 100644
--- a/gson/src/test/java/com/google/gson/functional/LeniencyTest.java
+++ b/gson/src/test/java/com/google/gson/functional/LeniencyTest.java
@@ -15,27 +15,29 @@
*/
package com.google.gson.functional;
+import static java.util.Collections.singletonList;
+import static org.junit.Assert.assertEquals;
+
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.reflect.TypeToken;
import java.util.List;
-import junit.framework.TestCase;
-
-import static java.util.Collections.singletonList;
+import org.junit.Before;
+import org.junit.Test;
/**
* Functional tests for leniency option.
*/
-public class LeniencyTest extends TestCase {
+public class LeniencyTest {
private Gson gson;
- @Override
- protected void setUp() throws Exception {
- super.setUp();
+ @Before
+ public void setUp() throws Exception {
gson = new GsonBuilder().setLenient().create();
}
+ @Test
public void testLenientFromJson() {
List<String> json = gson.fromJson(""
+ "[ # One!\n"