diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-03 23:13:32 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-03 23:13:32 +0200 |
commit | 2b1c32590db960be2b5f62897e65bb10d434cae0 (patch) | |
tree | 84623e4293f59f67331a7760a700121737313c48 /container-compiler-plugin/src/test/java | |
parent | df92538ab3d83da9839f08b28fc8a67317565463 (diff) | |
download | container-playground-2b1c32590db960be2b5f62897e65bb10d434cae0.tar.gz container-playground-2b1c32590db960be2b5f62897e65bb10d434cae0.tar.bz2 container-playground-2b1c32590db960be2b5f62897e65bb10d434cae0.tar.xz container-playground-2b1c32590db960be2b5f62897e65bb10d434cae0.zip |
wip
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>>"); + } +} |