Package it.tidalwave.util.test
Class BaseTestHelper.TestResource
java.lang.Object
it.tidalwave.util.test.BaseTestHelper.TestResource
- Enclosing class:
BaseTestHelper
A manipulator of a pair of (actual file, expected file).
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Assert that the content of the actual file are the same as the expected file.Reads the content from the resource file as a single string.void
writeToActualFile
(byte[] bytes) Writes the given bytes to the actual file.void
writeToActualFile
(Iterable<String> strings) Writes the given strings to the actual file.void
writeToActualFile
(String... strings) Writes the given strings to the actual file.
-
Constructor Details
-
TestResource
public TestResource()
-
-
Method Details
-
assertActualFileContentSameAsExpected
Assert that the content of the actual file are the same as the expected file.- Throws:
IOException
- in case of error
-
writeToActualFile
Writes the given strings to the actual file.- Parameters:
strings
- the strings- Throws:
IOException
- in case of error
-
writeToActualFile
Writes the given strings to the actual file.- Parameters:
strings
- the strings- Throws:
IOException
- in case of error
-
writeToActualFile
Writes the given bytes to the actual file.- Parameters:
bytes
- the bytes- Throws:
IOException
- in case of error
-
readStringFromResource
Reads the content from the resource file as a single string.- Returns:
- the string
- Throws:
IOException
- in case of error
-