blob: 31557624235864841ea84611971b56fab5269570 [file] [log] [blame]
package test.guice;
import com.google.inject.Inject;
import org.testng.TestNG;
import org.testng.TestNGException;
import org.testng.annotations.Test;
import test.SimpleBaseTest;
@Test(guiceModule = GuiceExampleModule.class)
public class GuiceTest extends SimpleBaseTest {
@Inject
ISingleton m_singleton;
@Test
public void singletonShouldWork() {
m_singleton.doSomething();
}
@Test(expectedExceptions = TestNGException.class)
public void invalidModuleShouldFail() {
TestNG tng = create(GuiceShouldFailTest.class);
tng.run();
}
}