Issue 552: (step 1) move core code to its own subdirectory

git-svn-id: https://google-guice.googlecode.com/svn/trunk@1300 d779f126-a31b-0410-b53b-1d3aecad763e
This commit is contained in:
mcculls
2010-10-21 19:10:16 +00:00
parent 97adab5a1c
commit 74d714c1e7
298 changed files with 9 additions and 9 deletions
@@ -0,0 +1,56 @@
// Copyright 2007 Google Inc. All Rights Reserved.
package com.google.inject;
import junit.framework.TestCase;
/**
* Tests relating to modules.
*
* @author kevinb
*/
public class ModuleTest extends TestCase {
static class A implements Module {
public void configure(Binder binder) {
binder.bind(X.class);
binder.install(new B());
binder.install(new C());
}
}
static class B implements Module {
public void configure(Binder binder) {
binder.bind(Y.class);
binder.install(new D());
}
}
static class C implements Module {
public void configure(Binder binder) {
binder.bind(Z.class);
binder.install(new D());
}
}
static class D implements Module {
public void configure(Binder binder) {
binder.bind(W.class);
}
@Override public boolean equals(Object obj) {
return obj.getClass() == D.class; // we're all equal in the eyes of guice
}
@Override public int hashCode() {
return D.class.hashCode();
}
}
static class X {}
static class Y {}
static class Z {}
static class W {}
public void testDiamond() throws Exception {
Guice.createInjector(new A());
}
}