public class TestFile
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TestFile.BinaryTestFile |
static class |
TestFile.BytecodeProducer |
static class |
TestFile.ByteProducer
Produces byte arrays, for use with
TestFile.BinaryTestFile |
static class |
TestFile.GradleTestFile |
static class |
TestFile.ImageTestFile |
static class |
TestFile.JarTestFile |
static class |
TestFile.JavaTestFile |
static class |
TestFile.ManifestTestFile |
static class |
TestFile.PropertyTestFile |
Modifier and Type | Field and Description |
---|---|
byte[] |
bytes |
java.lang.String |
contents |
java.lang.String |
sourceRelativePath |
java.lang.String |
targetRelativePath |
java.lang.String |
targetRootFolder |
Constructor and Description |
---|
TestFile() |
Modifier and Type | Method and Description |
---|---|
TestFile |
copy(java.lang.String relativePath,
TestResourceProvider provider) |
java.io.File |
createFile(java.io.File targetDir) |
TestFile |
from(java.lang.String from,
TestResourceProvider provider) |
java.lang.String |
getContents() |
java.lang.String |
getTargetPath() |
TestFile |
to(java.lang.String to) |
TestFile |
withBytes(byte[] bytes) |
TestFile |
within(java.lang.String root) |
TestFile |
withSource(java.lang.String source) |
public java.lang.String sourceRelativePath
public java.lang.String targetRelativePath
public java.lang.String contents
public byte[] bytes
public java.lang.String targetRootFolder
public TestFile withSource(@NonNull java.lang.String source)
public TestFile from(@NonNull java.lang.String from, @NonNull TestResourceProvider provider)
public TestFile to(@NonNull java.lang.String to)
public TestFile within(@Nullable java.lang.String root)
public TestFile copy(@NonNull java.lang.String relativePath, @NonNull TestResourceProvider provider)
@NonNull public java.lang.String getTargetPath()
@NonNull public java.io.File createFile(@NonNull java.io.File targetDir) throws java.io.IOException
java.io.IOException
@Nullable public java.lang.String getContents()
public TestFile withBytes(@NonNull byte[] bytes)