Add unit test for Version conversion.
@@ -63,6 +63,7 @@ import java.util.stream.Stream;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
+import org.osgi.framework.Version;
import org.osgi.util.converter.MyDTO.Count;
import org.osgi.util.converter.MyEmbeddedDTO.Alpha;
@@ -89,6 +90,15 @@ public class ConverterTest {
converter = null;
}
+ @Test
+ public void testVersion() {
+ Version v =new Version(1,2,3,"qualifier");
+ Converter c = Converters.standardConverter();
+ String s = c.convert(v).to(String.class);
+ Version v2 = c.convert(s).to(Version.class);
+ assertEquals(v, v2);
+ }
+
@Test
public void testSimpleConversions() {
// Conversions to String
