本文整理汇总了Java中com.google.common.testing.TearDownStack类的典型用法代码示例。如果您正苦于以下问题:Java TearDownStack类的具体用法?Java TearDownStack怎么用?Java TearDownStack使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TearDownStack类属于com.google.common.testing包,在下文中一共展示了TearDownStack类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getToTearDown
import com.google.common.testing.TearDownStack; //导入依赖的package包/类
@Provides
@TestScoped
ToTearDown getToTearDown() {
return new ToTearDown() {
TearDownStack delegate = new TearDownStack();
public void addTearDown(TearDown tearDown) {
delegate.addTearDown(tearDown);
}
public void runTearDown() {
delegate.runTearDown();
}
};
}
示例2: buildTestModule
import com.google.common.testing.TearDownStack; //导入依赖的package包/类
private AbstractModule buildTestModule(final IcMaster icMaster) {
return new AbstractModule() {
@Override
protected void configure() {
install(icMaster.buildClientModule());
bind(TestId.class).toInstance(TEST_ID);
bind(TearDownAccepter.class).toInstance(new TearDownStack());
}
};
}
示例3: setUp
import com.google.common.testing.TearDownStack; //导入依赖的package包/类
@BeforeMethod
public void setUp() {
tearDownTestCase = new TearDownTestCase(){};
messages = new ArrayList<String>();
handler = new TestLogHandler();
TearDownStack.logger.addHandler(handler);
TearDownStack.logger.setUseParentHandlers(false);
}
示例4: tearDownTestNG
import com.google.common.testing.TearDownStack; //导入依赖的package包/类
@AfterMethod(alwaysRun = true)
public void tearDownTestNG() {
tearDownTestCase = null;
messages = null;
handler = null;
// Revert to previous settings.
TearDownStack.logger.removeHandler(handler);
TearDownStack.logger.setUseParentHandlers(true);
}
示例5: setUp
import com.google.common.testing.TearDownStack; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
test = new TearDownTestCase() {};
messages = new ArrayList<String>();
handler = new TestLogHandler();
TearDownStack.logger.addHandler(handler);
TearDownStack.logger.setUseParentHandlers(false);
}
示例6: tearDown
import com.google.common.testing.TearDownStack; //导入依赖的package包/类
/** This is deeply ironic. */
@After
public void tearDown() throws Exception {
TearDownStack.logger.removeHandler(handler);
TearDownStack.logger.setUseParentHandlers(true);
}