Class LocalFileTestResource
- java.lang.Object
-
- org.thymeleaf.testing.templateengine.resource.AbstractTestResource
-
- org.thymeleaf.testing.templateengine.resource.LocalFileTestResource
-
- All Implemented Interfaces:
ILocalTestResource,ITestResource,ITestResourceItem
public class LocalFileTestResource extends AbstractTestResource implements ITestResourceItem, ILocalTestResource
-
-
Field Summary
Fields Modifier and Type Field Description private booleanavoidUnicodeUnescapeOnReadprivate java.lang.StringcharacterEncodingprivate java.io.FileresourceFile
-
Constructor Summary
Constructors Constructor Description LocalFileTestResource(java.io.File file, java.lang.String characterEncoding)LocalFileTestResource(java.io.File file, java.lang.String characterEncoding, boolean avoidUnicodeUnescapeOnRead)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetCharacterEncoding()java.io.FilegetResourceFile()java.lang.StringreadAsText()private static java.lang.StringvalidateFile(java.io.File file)-
Methods inherited from class org.thymeleaf.testing.templateengine.resource.AbstractTestResource
getName
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.thymeleaf.testing.templateengine.resource.ITestResource
getName
-
-
-
-
Method Detail
-
validateFile
private static java.lang.String validateFile(java.io.File file)
-
getResourceFile
public java.io.File getResourceFile()
- Specified by:
getResourceFilein interfaceILocalTestResource
-
getCharacterEncoding
public java.lang.String getCharacterEncoding()
- Specified by:
getCharacterEncodingin interfaceILocalTestResource
-
readAsText
public java.lang.String readAsText()
- Specified by:
readAsTextin interfaceITestResourceItem
-
-