Package org.jastacry.test.utils
Class Tooling
- java.lang.Object
-
- org.jastacry.test.utils.Tooling
-
public final class Tooling extends java.lang.ObjectHelper 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 booleancompareFiles(java.io.File file1, java.io.File file2)compare two files if they are equal.voidcreateBinaryTestfile(java.io.File file)Create a binary input file with all byte values possible.voidcreateBinaryTestfile(java.io.File file, long length, byte bValue)Create a binary input file with only one byte values used.voidlistProviders()List all installed crypto providers.voidmockupInputOutputDecStreams(org.jastacry.layer.Layer layer)General mockup for IO Exceptions.voidmockupInputOutputEncStreams(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.IOExceptionGeneral 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.IOExceptionGeneral mockup for IO Exceptions.- Parameters:
layer- The layer to be tested- Throws:
org.jastacry.JastacryException- on errorjava.io.IOException- on error
-
-