Package org.codehaus.xfire.util

Source Code of org.codehaus.xfire.util.DeleteOnCloseFileInputStreamTest

package org.codehaus.xfire.util;

import java.io.File;

import junit.framework.TestCase;

public class DeleteOnCloseFileInputStreamTest extends TestCase {
  public void testIt() throws Exception {
    String property = System.getProperty("java.io.tmpdir");
    File tempFile = new File(property, getClass().getName());
    assertTrue(tempFile.createNewFile());
    DeleteOnCloseFileInputStream is = new DeleteOnCloseFileInputStream(tempFile);
    is.close();
    assertFalse("file was not deleted.", tempFile.exists());
  }
}
TOP

Related Classes of org.codehaus.xfire.util.DeleteOnCloseFileInputStreamTest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.