|
| 1 | +diff --git a/pom.xml b/pom.xml |
| 2 | +index 65f0f80..508b290 100644 |
| 3 | +--- a/pom.xml |
| 4 | ++++ b/pom.xml |
| 5 | +@@ -40,9 +40,57 @@ |
| 6 | + <target>1.8</target> |
| 7 | + </configuration> |
| 8 | + </plugin> |
| 9 | ++ <plugin> |
| 10 | ++ <groupId>org.jacoco</groupId> |
| 11 | ++ <artifactId>jacoco-maven-plugin</artifactId> |
| 12 | ++ <version>0.8.6</version> |
| 13 | ++ <executions> |
| 14 | ++ <execution> |
| 15 | ++ <id>default-prepare-agent</id> |
| 16 | ++ <goals> |
| 17 | ++ <goal>prepare-agent</goal> |
| 18 | ++ </goals> |
| 19 | ++ </execution> |
| 20 | ++ <execution> |
| 21 | ++ <id>jacoco-report</id> |
| 22 | ++ <phase>test</phase> |
| 23 | ++ <goals> |
| 24 | ++ <goal>report</goal> |
| 25 | ++ </goals> |
| 26 | ++ </execution> |
| 27 | ++ </executions> |
| 28 | ++ </plugin> |
| 29 | ++ <plugin> |
| 30 | ++ <groupId>org.apache.maven.plugins</groupId> |
| 31 | ++ <artifactId>maven-jar-plugin</artifactId> |
| 32 | ++ <version>3.2.0</version> |
| 33 | ++ <executions> |
| 34 | ++ <execution> |
| 35 | ++ <goals> |
| 36 | ++ <goal>test-jar</goal> |
| 37 | ++ </goals> |
| 38 | ++ </execution> |
| 39 | ++ </executions> |
| 40 | ++ </plugin> |
| 41 | + </plugins> |
| 42 | + </build> |
| 43 | + |
| 44 | ++ <reporting> |
| 45 | ++ <plugins> |
| 46 | ++ <plugin> |
| 47 | ++ <groupId>org.jacoco</groupId> |
| 48 | ++ <artifactId>jacoco-maven-plugin</artifactId> |
| 49 | ++ <reportSets> |
| 50 | ++ <reportSet> |
| 51 | ++ <reports> |
| 52 | ++ <report>report</report> |
| 53 | ++ </reports> |
| 54 | ++ </reportSet> |
| 55 | ++ </reportSets> |
| 56 | ++ </plugin> |
| 57 | ++ </plugins> |
| 58 | ++ </reporting> |
| 59 | ++ |
| 60 | + <dependencies> |
| 61 | + |
| 62 | + <dependency> |
| 63 | +diff --git a/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java b/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java |
| 64 | +index 8312fe2..e898509 100644 |
| 65 | +--- a/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java |
| 66 | ++++ b/src/test/java/com/indeed/mph/serializers/TestSmartListSerializer.java |
| 67 | +@@ -1,9 +1,9 @@ |
| 68 | + package com.indeed.mph.serializers; |
| 69 | +- |
| 70 | ++import com.pholser.junit.quickcheck.From; |
| 71 | + import com.pholser.junit.quickcheck.Property; |
| 72 | + import com.pholser.junit.quickcheck.runner.JUnitQuickcheck; |
| 73 | + import org.junit.runner.RunWith; |
| 74 | +- |
| 75 | ++import com.indeed.mph.generators.IntListGenerator; |
| 76 | + import java.io.IOException; |
| 77 | + import java.util.List; |
| 78 | + |
| 79 | +@@ -23,7 +23,23 @@ public class TestSmartListSerializer { |
| 80 | + final SmartListSerializer<Byte> bytesSerializer = new SmartListSerializer<>(new SmartByteSerializer()); |
| 81 | + assertRoundTrip(bytesSerializer, byteTarget); |
| 82 | + |
| 83 | ++ final SmartListSerializer<String> stringsSerializer = new SmartListSerializer<>(new SmartStringSerializer()); |
| 84 | ++ assertRoundTrip(stringsSerializer, stringTarget); |
| 85 | ++ } |
| 86 | ++ @Property |
| 87 | ++ public void canRoundTripSerializableListsWithGenerator( |
| 88 | ++ @From(IntListGenerator.class) final List<Integer> intTarget, |
| 89 | ++ final List<Byte> byteTarget, |
| 90 | ++ final List<String> stringTarget |
| 91 | ++ ) throws IOException { |
| 92 | ++ final SmartListSerializer<Integer> intsSerializer = new SmartListSerializer<>(new SmartIntegerSerializer()); |
| 93 | ++ assertRoundTrip(intsSerializer, intTarget); |
| 94 | ++ |
| 95 | ++ final SmartListSerializer<Byte> bytesSerializer = new SmartListSerializer<>(new SmartByteSerializer()); |
| 96 | ++ assertRoundTrip(bytesSerializer, byteTarget); |
| 97 | ++ |
| 98 | + final SmartListSerializer<String> stringsSerializer = new SmartListSerializer<>(new SmartStringSerializer()); |
| 99 | + assertRoundTrip(stringsSerializer, stringTarget); |
| 100 | + } |
| 101 | + } |
| 102 | ++ |
0 commit comments