Home | History | Annotate | Download | only in guice
      1 package test.guice;
      2 
      3 import com.google.inject.Inject;
      4 
      5 import org.testng.annotations.Guice;
      6 import org.testng.annotations.Test;
      7 
      8 import test.SimpleBaseTest;
      9 
     10 @Guice(modules = GuiceExampleModule.class)
     11 public class Guice1Test extends SimpleBaseTest {
     12   static ISingleton m_object;
     13 
     14   @Inject
     15   ISingleton m_singleton;
     16 
     17   @Test
     18   public void singletonShouldWork() {
     19     m_singleton.doSomething();
     20     m_object = m_singleton;
     21   }
     22 
     23 }
     24