Revision: 1315
Author: sberlin
Date: Sun Oct 24 19:52:08 2010
Log: issue 496 -- ConstantBindingBuilder was missing to(byte), forgot to
commit test.
http://code.google.com/p/google-guice/source/detail?r=1315
Modified:
/trunk/core/test/com/google/inject/spi/ElementsTest.java
=======================================
--- /trunk/core/test/com/google/inject/spi/ElementsTest.java Thu Oct 21
15:05:58 2010
+++ /trunk/core/test/com/google/inject/spi/ElementsTest.java Sun Oct 24
19:52:08 2010
@@ -189,6 +189,7 @@
bindConstant().annotatedWith(Names.named("float")).to(6.0f);
bindConstant().annotatedWith(Names.named("short")).to((short)
7);
bindConstant().annotatedWith(Names.named("char")).to('h');
+ bindConstant().annotatedWith(Names.named("byte")).to((byte) 8);
bindConstant().annotatedWith(Names.named("Class")).to(Iterator.class);
bindConstant().annotatedWith(Names.named("Enum")).to(CoinSide.TAILS);
}
@@ -265,6 +266,15 @@
return null;
}
},
+
+ new FailingElementVisitor() {
+ @Override public <T> Void visit(Binding<T> command) {
+ assertTrue(command instanceof InstanceBinding);
+ assertEquals(Key.get(Byte.class, Names.named("byte")),
command.getKey());
+ assertEquals((byte) 8, getInstance(command));
+ return null;
+ }
+ },
new FailingElementVisitor() {
@Override public <T> Void visit(Binding<T> command) {
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.