| org.apache.commons.io.output.DeferredFileOutputStreamTest
DeferredFileOutputStreamTest | public class DeferredFileOutputStreamTest extends TestCase (Code) | | Unit tests for the DeferredFileOutputStream class.
author: Martin Cooper version: $Id: DeferredFileOutputStreamTest.java 437680 2006-08-28 11:57:00Z scolebourne $ |
Method Summary | |
public void | testAboveThreshold() Tests the case where the amount of data exceeds the threshold, and is
therefore written to disk. | public void | testAtThreshold() Tests the case where the amount of data is exactly the same as the
threshold. | public void | testBelowThreshold() Tests the case where the amount of data falls below the threshold, and
is therefore confined to memory. | public void | testThresholdReached() Tests the case where there are multiple writes beyond the threshold, to
ensure that the thresholdReached() method is only called
once, as the threshold is crossed for the first time. | public void | testWriteToLarge() Test wether writeTo() properly writes large content. | public void | testWriteToSmall() Test wether writeTo() properly writes small content. |
DeferredFileOutputStreamTest | public DeferredFileOutputStreamTest(String name)(Code) | | Standard JUnit test case constructor.
Parameters: name - The name of the test case. |
testAboveThreshold | public void testAboveThreshold()(Code) | | Tests the case where the amount of data exceeds the threshold, and is
therefore written to disk. The actual data written to disk is verified,
as is the file itself.
|
testAtThreshold | public void testAtThreshold()(Code) | | Tests the case where the amount of data is exactly the same as the
threshold. The behavior should be the same as that for the amount of
data being below (i.e. not exceeding) the threshold.
|
testBelowThreshold | public void testBelowThreshold()(Code) | | Tests the case where the amount of data falls below the threshold, and
is therefore confined to memory.
|
testThresholdReached | public void testThresholdReached()(Code) | | Tests the case where there are multiple writes beyond the threshold, to
ensure that the thresholdReached() method is only called
once, as the threshold is crossed for the first time.
|
testWriteToLarge | public void testWriteToLarge()(Code) | | Test wether writeTo() properly writes large content.
|
testWriteToSmall | public void testWriteToSmall()(Code) | | Test wether writeTo() properly writes small content.
|
|
|