diff options
Diffstat (limited to 'examples/11-transient-0/output/java/src')
| -rw-r--r-- | examples/11-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/11-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java b/examples/11-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java index 39eac79..0110de3 100644 --- a/examples/11-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java +++ b/examples/11-transient-0/output/java/src/test/java/org/zwobble/example/Transient0Tests.java @@ -5,7 +5,9 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.Optional; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; @@ -209,20 +211,20 @@ public class Transient0Tests { Decoder<T> decoder ) throws IOException { var outputStream = new ByteArrayOutputStream(); - encoder.encode(value, outputStream); + encoder.encode(value, outputStream, new HashMap<>()); var bytes = outputStream.toByteArray(); var inputStream = new ByteArrayInputStream(bytes); - var decodedValue = decoder.decode(inputStream); + var decodedValue = decoder.decode(inputStream, new HashMap<>()); Assertions.assertEquals(value, decodedValue); } private interface Encoder<T> { - void encode(T value, OutputStream outputStream) throws IOException; + void encode(T value, OutputStream outputStream, Map<String, Object> sharedValues) throws IOException; } private interface Decoder<T> { - T decode(InputStream inputStream) throws IOException; + T decode(InputStream inputStream, Map<String, Object> sharedValues) throws IOException; } } |
