felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject svn commit: r1788117 - in /felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl: json/JsonSerializerTest.java yaml/YamlSerializerTest.java
Date Wed, 22 Mar 2017 15:00:42 GMT
Author: davidb
Date: Wed Mar 22 15:00:42 2017
New Revision: 1788117

URL: http://svn.apache.org/viewvc?rev=1788117&view=rev
Log:
Felix Serializer - Fix compilation issues with tests.

Modified:
    felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
    felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java

Modified: felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java?rev=1788117&r1=1788116&r2=1788117&view=diff
==============================================================================
--- felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
(original)
+++ felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/json/JsonSerializerTest.java
Wed Mar 22 15:00:42 2017
@@ -29,6 +29,7 @@ import org.junit.Test;
 import org.osgi.util.converter.Converter;
 import org.osgi.util.converter.StandardConverter;
 import org.osgi.util.converter.TypeReference;
+import org.osgi.util.converter.TypeRule;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
@@ -83,7 +84,8 @@ public class JsonSerializerTest {
         m.put("submap", m1);
 
         Converter ca = converter.newConverterBuilder().
-                rule(Foo.class, String.class, Foo::tsFun, v -> Foo.fsFun(v)).build();
+                rule(new TypeRule<Foo, String>(Foo.class, String.class, Foo::tsFun)).
+                rule(new TypeRule<String, Foo>(String.class, Foo.class, v -> Foo.fsFun(v))).build();
 
         JsonSerializerImpl jsonCodec = new JsonSerializerImpl();
         String json = jsonCodec.serialize(m).with(ca).toString();

Modified: felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java?rev=1788117&r1=1788116&r2=1788117&view=diff
==============================================================================
--- felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java
(original)
+++ felix/trunk/converter/serializer/src/test/java/org/apache/felix/serializer/impl/yaml/YamlSerializerTest.java
Wed Mar 22 15:00:42 2017
@@ -19,6 +19,7 @@ package org.apache.felix.serializer.impl
 import java.util.HashMap;
 import java.util.Map;
 
+import org.apache.felix.serializer.impl.yaml.YamlSerializerTest.Foo;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -26,6 +27,7 @@ import org.junit.Test;
 import org.osgi.util.converter.Converter;
 import org.osgi.util.converter.StandardConverter;
 import org.osgi.util.converter.TypeReference;
+import org.osgi.util.converter.TypeRule;
 
 import static org.junit.Assert.assertEquals;
 
@@ -80,7 +82,8 @@ public class YamlSerializerTest {
         m.put("submap", m1);
 
         Converter ca = converter.newConverterBuilder().
-                rule(Foo.class, String.class, Foo::tsFun, v -> Foo.fsFun(v)).build();
+                rule(new TypeRule<Foo, String>(Foo.class, String.class, Foo::tsFun)).
+                rule(new TypeRule<String, Foo>(String.class, Foo.class, v -> Foo.fsFun(v))).build();
 
         YamlSerializerImpl yamlCodec = new YamlSerializerImpl();
         String yaml = yamlCodec.serialize(m).with(ca).toString();



Mime
View raw message