Add convenience method to create test values.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 25 Nov 2014 20:27:23 +0000 (21:27 +0100)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Tue, 25 Nov 2014 20:28:05 +0000 (21:28 +0100)
src/test/java/net/pterodactylus/sone/TestValue.java

index dd923d3..43cf0a6 100644 (file)
@@ -52,4 +52,8 @@ public class TestValue<T> implements Value<T> {
                return String.valueOf(value.get());
        }
 
+       public static <T> Value<T> from(T value) {
+               return new TestValue<T>(value);
+       }
+
 }