@@ -0,0 +1,2503 @@
+/**%0A * Copyright (C) 2013 Google, Inc.%0A * Copyright (C) 2013 Square, 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 dagger.tests.integration.operation;%0A%0Aimport dagger.Module;%0Aimport dagger.ObjectGraph;%0Aimport dagger.Provides;%0Aimport javax.inject.Inject;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0Aimport static org.truth0.Truth.ASSERT;%0A%0A@RunWith(JUnit4.class)%0Apublic final class SimpleInjectionTest %7B%0A  static abstract class AbstractFoo %7B%0A    @Inject String blah;%0A  %7D%0A%0A  static class Foo extends AbstractFoo %7B %7D%0A%0A  @Module(injects = Foo.class)%0A  static class FooModule %7B%0A    @Provides String string() %7B return %22blah%22; %7D%0A  %7D%0A%0A  @Module(injects = Foo.class)%0A  static class ProvidingFooModule %7B%0A    @Provides String string() %7B return %22blah%22; %7D%0A    @Provides Foo foo(String blah) %7B%0A      Foo foo = new Foo();%0A      foo.blah = blah;%0A      return foo;%0A    %7D%0A  %7D%0A%0A  @Test public void memberInject_WithoutProvidesMethod() %7B%0A    Foo foo = new Foo();%0A    ObjectGraph.create(FooModule.class).inject(foo);%0A    ASSERT.that(foo.blah).equals(%22blah%22);%0A  %7D%0A%0A  @Test public void membersInject_WithProvidesMethod() %7B%0A    Foo foo = new Foo();%0A    ObjectGraph.create(ProvidingFooModule.class).inject(foo);%0A    ASSERT.that(foo.blah).equals(%22blah%22);%0A  %7D%0A%0A  @Test public void get_WithProvidesMethod() %7B%0A    Foo foo = ObjectGraph.create(ProvidingFooModule.class).get(Foo.class);%0A    ASSERT.that(foo.blah).equals(%22blah%22);%0A  %7D%0A%0A  static class Bar %7B %7D%0A%0A  @Module(injects = Bar.class)%0A  static class BarModule %7B%0A  %7D%0A%0A  @Test public void membersInject_WithNonInjectable() %7B%0A    Bar bar = new Bar();%0A    ObjectGraph.create(BarModule.class).inject(bar);%0A  %7D%0A%0A  @Module(injects = Bar.class)%0A  static class ProvidingBarModule %7B%0A    @Provides public Bar bar() %7B return new Bar(); %7D%0A  %7D%0A%0A  @Test public void membersInject_WithProvidedNonInjectable() %7B%0A    Bar bar = ObjectGraph.create(ProvidingBarModule.class).get(Bar.class);%0A    ASSERT.that(bar).isNotNull();%0A  %7D%0A%0A%7D%0A

Add a regression test.