com.google.common.testing
Interface TearDown

All Known Implementing Classes:
SloppyTearDown

public interface TearDown

An object that can perform a tearDown() operation.

Author:
Kevin Bourrillion

Method Summary
 void tearDown()
          Performs a single tear-down operation.
 

Method Detail

tearDown

void tearDown()
              throws java.lang.Exception
Performs a single tear-down operation. See TearDownTestCase and TearDownTestCase for example.

If you want to not fail a test when a TearDown throws an exception, you should implement a SloppyTearDown instead.

Note that, for backwards compatibility, JUnit 3's TearDownTestCase currently does not fail a test when an exception is thrown from one of its TearDowns, but this is subject to change. Also, Junit 4's TearDownTestCase will.

Throws:
java.lang.Exception - for any reason. TearDownTestCase ensures that any exception thrown will not interfere with other TearDown operations.


Copyright © 2010 Google. All Rights Reserved.