Package org.jastacry.test.utils
Class Tooling
- java.lang.Object
-
- org.jastacry.test.utils.Tooling
-
public final class Tooling extends java.lang.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(java.io.File file1, java.io.File file2)
compare two files if they are equal.void
createBinaryTestfile(java.io.File file)
Create a binary input file with all byte values possible.void
createBinaryTestfile(java.io.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(org.jastacry.layer.Layer layer)
General mockup for IO Exceptions.void
mockupInputOutputEncStreams(org.jastacry.layer.Layer layer)
General mockup for IO Exceptions.
-
-
-
Method Detail
-
compareFiles
public boolean compareFiles(java.io.File file1, java.io.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(java.io.File file)
Create a binary input file with all byte values possible.- Parameters:
file
- File to create
-
createBinaryTestfile
public void createBinaryTestfile(java.io.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(org.jastacry.layer.Layer layer) throws org.jastacry.JastacryException, java.io.IOException
General mockup for IO Exceptions.- Parameters:
layer
- The layer to be tested- Throws:
org.jastacry.JastacryException
- on errorjava.io.IOException
- on error
-
mockupInputOutputDecStreams
public void mockupInputOutputDecStreams(org.jastacry.layer.Layer layer) throws org.jastacry.JastacryException, java.io.IOException
General mockup for IO Exceptions.- Parameters:
layer
- The layer to be tested- Throws:
org.jastacry.JastacryException
- on errorjava.io.IOException
- on error
-
-