diff --git a/kotlin/tests/pom.xml b/kotlin/tests/pom.xml
index 4c9c541..fef7548 100644
--- a/kotlin/tests/pom.xml
+++ b/kotlin/tests/pom.xml
@@ -108,7 +108,7 @@
src/test/kotlin
src/test/java
- target/generated-sources/kapt/test
+ target/generated-sources/kaptKotlin/test
@@ -144,7 +144,9 @@
java-test-compile
test-compile
- testCompile
+
+ testCompile
+
diff --git a/moshi/src/test/java/com/squareup/moshi/JsonValueWriterTest.java b/moshi/src/test/java/com/squareup/moshi/JsonValueWriterTest.java
index a321104..7faae6f 100644
--- a/moshi/src/test/java/com/squareup/moshi/JsonValueWriterTest.java
+++ b/moshi/src/test/java/com/squareup/moshi/JsonValueWriterTest.java
@@ -18,6 +18,7 @@ package com.squareup.moshi;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.BigInteger;
+import java.util.AbstractMap.SimpleEntry;
import java.util.Arrays;
import java.util.List;
import java.util.Map;
@@ -28,7 +29,6 @@ import org.junit.Test;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.entry;
import static org.junit.Assert.fail;
public final class JsonValueWriterTest {
@@ -57,8 +57,11 @@ public final class JsonValueWriterTest {
writer.name("d").nullValue();
writer.endObject();
- assertThat((Map, ?>) writer.root()).containsExactly(
- entry("a", "s"), entry("b", 1.5d), entry("c", true), entry("d", null));
+ assertThat((Map) writer.root()).containsExactly(
+ new SimpleEntry("a", "s"),
+ new SimpleEntry("b", 1.5d),
+ new SimpleEntry("c", true),
+ new SimpleEntry("d", null));
}
@Test public void repeatedNameThrows() throws IOException {
@@ -253,8 +256,11 @@ public final class JsonValueWriterTest {
writer.name("d");
writer.value(new Buffer().writeUtf8("null"));
writer.endObject();
- assertThat((Map, ?>) writer.root()).containsExactly(
- entry("a", singletonList("value")), entry("b", 2.0d), entry("c", 3L), entry("d", null));
+ assertThat((Map) writer.root()).containsExactly(
+ new SimpleEntry("a", singletonList("value")),
+ new SimpleEntry("b", 2.0d),
+ new SimpleEntry("c", 3L),
+ new SimpleEntry("d", null));
}
/**
diff --git a/moshi/src/test/java/com/squareup/moshi/MapJsonAdapterTest.java b/moshi/src/test/java/com/squareup/moshi/MapJsonAdapterTest.java
index c967047..d368ce6 100644
--- a/moshi/src/test/java/com/squareup/moshi/MapJsonAdapterTest.java
+++ b/moshi/src/test/java/com/squareup/moshi/MapJsonAdapterTest.java
@@ -17,12 +17,12 @@ package com.squareup.moshi;
import java.io.IOException;
import java.lang.reflect.Type;
+import java.util.AbstractMap.SimpleEntry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import okio.Buffer;
-import org.assertj.core.data.MapEntry;
import org.junit.Test;
import static com.squareup.moshi.TestUtil.newReader;
@@ -45,7 +45,9 @@ public final class MapJsonAdapterTest {
Map fromJson = fromJson(
String.class, Boolean.class, "{\"a\":true,\"b\":false,\"c\":null}");
assertThat(fromJson).containsExactly(
- MapEntry.entry("a", true), MapEntry.entry("b", false), MapEntry.entry("c", null));
+ new SimpleEntry("a", true),
+ new SimpleEntry("b", false),
+ new SimpleEntry("c", null));
}
@Test public void mapWithNullKeyFailsToEmit() throws Exception {
@@ -119,13 +121,15 @@ public final class MapJsonAdapterTest {
String toJson = toJson(Integer.class, Boolean.class, map);
assertThat(toJson).isEqualTo("{\"5\":true,\"6\":false,\"7\":null}");
- Map fromJson = fromJson(
+ Map fromJson = fromJson(
Integer.class, Boolean.class, "{\"5\":true,\"6\":false,\"7\":null}");
assertThat(fromJson).containsExactly(
- MapEntry.entry(5, true), MapEntry.entry(6, false), MapEntry.entry(7, null));
+ new SimpleEntry(5, true),
+ new SimpleEntry(6, false),
+ new SimpleEntry(7, null));
}
- @Test public void mapWithNonStringKeysToJsonObject() throws Exception {
+ @Test public void mapWithNonStringKeysToJsonObject() {
Map map = new LinkedHashMap<>();
map.put(5, true);
map.put(6, false);
diff --git a/moshi/src/test/java/com/squareup/moshi/ObjectAdapterTest.java b/moshi/src/test/java/com/squareup/moshi/ObjectAdapterTest.java
index a844d94..72d2347 100644
--- a/moshi/src/test/java/com/squareup/moshi/ObjectAdapterTest.java
+++ b/moshi/src/test/java/com/squareup/moshi/ObjectAdapterTest.java
@@ -22,6 +22,7 @@ import java.math.BigDecimal;
import java.util.AbstractCollection;
import java.util.AbstractList;
import java.util.AbstractMap;
+import java.util.AbstractMap.SimpleEntry;
import java.util.AbstractSet;
import java.util.Arrays;
import java.util.Collection;
@@ -40,10 +41,9 @@ import org.junit.Test;
import static java.util.Collections.singletonList;
import static java.util.Collections.singletonMap;
import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.entry;
public final class ObjectAdapterTest {
- @Test public void toJsonUsesRuntimeType() throws Exception {
+ @Test public void toJsonUsesRuntimeType() {
Delivery delivery = new Delivery();
delivery.address = "1455 Market St.";
Pizza pizza = new Pizza();
@@ -62,7 +62,7 @@ public final class ObjectAdapterTest {
+ "}");
}
- @Test public void toJsonJavaLangObject() throws Exception {
+ @Test public void toJsonJavaLangObject() {
Moshi moshi = new Moshi.Builder().build();
JsonAdapter