diff options
Diffstat (limited to 'container-compiler-plugin/src/test/java')
-rw-r--r-- | container-compiler-plugin/src/test/java/io/trygvis/container/compiler/model/TypeRefTest.java | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/model/TypeRefTest.java b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/model/TypeRefTest.java new file mode 100644 index 0000000..94425cc --- /dev/null +++ b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/model/TypeRefTest.java @@ -0,0 +1,19 @@ +package io.trygvis.container.compiler.model; + +import org.testng.Assert; +import org.testng.annotations.Test; + +import static org.testng.Assert.assertEquals; + +public class TypeRefTest { + @Test + public void testBasic() { + TypeRef foo = new TypeRef("wat.Foo"); + TypeRef string = new TypeRef(String.class); + TypeRef bar = new TypeRef("wat.Bar").args(string); + TypeRef baz = new TypeRef("woot.Baz").args(bar); + assertEquals(foo.toString(), "wat.Foo"); + assertEquals(bar.toString(), "wat.Bar<java.lang.String>"); + assertEquals(baz.toString(), "woot.Baz<wat.Bar<java.lang.String>>"); + } +} |