Example usage for com.google.common.testing TearDown TearDown

List of usage examples for com.google.common.testing TearDown TearDown

Introduction

In this page you can find the example usage for com.google.common.testing TearDown TearDown.

Prototype

TearDown

Source Link

Usage

From source file:org.ctoolkit.test.appengine.ServiceConfigModule.java

@Provides
TestWrapper getTestWrapper(final TearDownAccepter tearDownAccepter) {
    return new TestWrapper() {
        public void toRunBeforeTest() {
            helper.setUp();//ww w.ja v  a  2 s. c o  m
            tearDownAccepter.addTearDown(new TearDown() {
                public void tearDown() throws Exception {
                    helper.tearDown();
                }
            });
        }
    };
}

From source file:com.twitter.common.testing.TearDownRegistry.java

@Override
public <E extends Exception, T extends ExceptionalCommand<E>> void addAction(final T action) {
    tearDownAccepter.addTearDown(new TearDown() {
        @Override/*from  ww w . ja  v a 2  s .c  om*/
        public void tearDown() throws Exception {
            action.execute();
        }
    });
}