Created
July 27, 2016 18:07
-
-
Save vorburger/37ac79aaf375cc43238cbf139d188d2b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package org.opendaylight.netvirt.aclservice.tests.utils.tests.inject; | |
| import static org.junit.Assert.assertEquals; | |
| import dagger.Component; | |
| import javax.inject.Inject; | |
| import javax.inject.Provider; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; | |
| import org.opendaylight.netvirt.aclservice.tests.utils.inject.InstanceProvidedBy; | |
| import org.opendaylight.netvirt.aclservice.tests.utils.inject.ProviderRunner; | |
| @RunWith(ProviderRunner.class) | |
| @InstanceProvidedBy(DaggerExampleRunWithTest_Configuration.class) | |
| public class ExampleRunWithTest { | |
| @Component(modules = TestModule1.class) | |
| interface Configuration extends Provider<ExampleRunWithTest> { | |
| ExampleRunWithTest get(); | |
| } | |
| @Inject Service service; | |
| @Inject | |
| public ExampleRunWithTest() { | |
| } | |
| @Test | |
| public void serviceTest() { | |
| assertEquals("hello, world", service.hi()); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment