FileDocCategorySizeDatePackage
LazyFileOutputStreamTest.javaAPI DocApache Ant 1.702055Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.util

LazyFileOutputStreamTest

public class LazyFileOutputStreamTest extends TestCase
since
Ant 1.6

Fields Summary
private LazyFileOutputStream
los
private static final File
f
Constructors Summary
public LazyFileOutputStreamTest(String s)


       
        super(s);
    
Methods Summary
public voidsetUp()

        los = new LazyFileOutputStream(f);
    
public voidtearDown()

        try {
            los.close();
        } finally {
            f.delete();
        }
    
public voidtestByteArray()

        los.write(new byte[] {0});
        los.close();
        assertTrue(f + " has been written.", f.exists());
    
public voidtestNoFileWithoutWrite()

        los.close();
        assertTrue(f + " has not been written.", !f.exists());
    
public voidtestOpen()

        los.open();
        los.close();
        assertTrue(f + " has been written.", f.exists());
    
public voidtestSingleByte()

        los.write(0);
        los.close();
        assertTrue(f + " has been written.", f.exists());