@@ -0,0 +1,2189 @@
+/*%0A * Copyright (C) 2008 Google Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A * http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage com.google.inject.testing.guiceberry.junit3.util;%0A%0Aimport com.google.common.base.Preconditions;%0Aimport com.google.common.testing.TearDownAccepter;%0Aimport com.google.inject.AbstractModule;%0Aimport com.google.inject.Inject;%0Aimport com.google.inject.Provider;%0Aimport com.google.inject.testing.guiceberry.GuiceBerryEnv;%0Aimport com.google.inject.testing.guiceberry.InjectionController;%0Aimport com.google.inject.testing.guiceberry.InjectionControllerProvider;%0Aimport com.google.inject.testing.guiceberry.TestId;%0A%0Aimport junit.framework.TestCase;%0A%0A/**%0A * A Guice %7B@link com.google.inject.Module%7D that can be installed in a %0A * %7B@link GuiceBerryEnv%7D that makes %7B@link InjectionController%7Ds available to be %0A * injected in tests.%0A * %0A * @author zorzella%0A */%0Apublic class InjectionControllerModule extends AbstractModule %7B%0A%0A  private static class InjectionControllerGuiceBerryProvider %0A    implements Provider%3CInjectionController%3E%7B%0A%0A    @Inject%0A    private Provider%3CTestId%3E testIdProvider;%0A%0A    @Inject%0A    private Provider%3CTestCase%3E testCaseProvider;%0A    %0A    public InjectionController get() %7B%0A      TestCase testCase = testCaseProvider.get();%0A      Preconditions.checkState(testCase instanceof TearDownAccepter, %0A          %22Test '%25s' must be a TearDownAccepter to use controllable injection%22, %0A          testCase);%0A      return InjectionControllerProvider.forTest(%0A          testIdProvider.get(), %0A          (TearDownAccepter)testCase);%0A    %7D%0A  %7D%0A%0A  @Override%0A  public void configure() %7B%0A    bind(InjectionController.class)%0A      .toProvider(InjectionControllerGuiceBerryProvider.class);%0A  %7D%0A%7D%0A

Add InjectionControllerModule