|
Struts example source code file (FileManagerTest.java)
The Struts FileManagerTest.java source codepackage com.opensymphony.xwork2.util; import com.opensymphony.xwork2.XWorkTestCase; import java.io.InputStream; import java.net.URL; /** * FileManager Tester. * * @author <Lukasz> * @since <pre>02/18/2009* @version 1.0 */ public class FileManagerTest extends XWorkTestCase { public void testGetFileInJar() throws Exception { testLoadFile("xwork-jar.xml"); testLoadFile("xwork - jar.xml"); testLoadFile("xwork-zip.xml"); testLoadFile("xwork - zip.xml"); testLoadFile("xwork-jar2.xml"); testLoadFile("xwork - jar2.xml"); testLoadFile("xwork-zip2.xml"); testLoadFile("xwork - zip2.xml"); } private void testLoadFile(String fileName) { FileManager.setReloadingConfigs(true); URL url = ClassLoaderUtil.getResource(fileName, FileManagerTest.class); InputStream file = FileManager.loadFile(url, true); assertNotNull(file); assertFalse(!FileManager.fileNeedsReloading(fileName)); } } Other Struts examples (source code examples)Here is a short list of links related to this Struts FileManagerTest.java source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.