Package org.jastacry.test.utils
Class Tooling
- java.lang.Object
-
- org.jastacry.test.utils.Tooling
-
public final class Tooling extends Object
Helper functions for automated tests.- Author:
- kai
-
-
Constructor Summary
Constructors Constructor Description Tooling()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compareFiles(File file1, File file2)
compare two files if they are equal.void
createBinaryTestfile(File file)
Create a binary input file with all byte values possible.void
createBinaryTestfile(File file, long length, byte bValue)
Create a binary input file with only one byte values used.void
listProviders()
List all installed crypto providers.void
mockupInputOutputDecStreams(Layer layer)
General mockup for IO Exceptions.void
mockupInputOutputEncStreams(Layer layer)
General mockup for IO Exceptions.
-
-
-
Method Detail
-
compareFiles
public boolean compareFiles(File file1, File file2)
compare two files if they are equal.- Parameters:
file1
- file onefile2
- file two- Returns:
- true if equal
-
listProviders
public void listProviders()
List all installed crypto providers.
-
createBinaryTestfile
public void createBinaryTestfile(File file)
Create a binary input file with all byte values possible.- Parameters:
file
- File to create
-
createBinaryTestfile
public void createBinaryTestfile(File file, long length, byte bValue)
Create a binary input file with only one byte values used.- Parameters:
file
- File to createlength
- how many bytes to writebValue
- the byte to write
-
mockupInputOutputEncStreams
public void mockupInputOutputEncStreams(Layer layer) throws JastacryException, IOException
General mockup for IO Exceptions.- Parameters:
layer
- The layer to be tested- Throws:
JastacryException
- on errorIOException
- on error
-
mockupInputOutputDecStreams
public void mockupInputOutputDecStreams(Layer layer) throws JastacryException, IOException
General mockup for IO Exceptions.- Parameters:
layer
- The layer to be tested- Throws:
JastacryException
- on errorIOException
- on error
-
-