Class ImageEncodingDecodingTests
java.lang.Object
test.de.iip_ecosphere.platform.kiServices.functions.images.ImageEncodingDecodingTests
A class dedicated to testing the methods of ImageEndiginDecoding.
- Author:
- Weber
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidTesting main method.static StringTests the conversion of bufferedImages to base64 Strings.static BufferedImageTests if a base64 file can be read and output as a BufferedImage.static StringTests the method to read in an image as a base64 string.static StringTests if a base64 String can be read in from a base64 file as used in this project.static BufferedImageTests the method to read in an image as a bufferedImage and returns that.
-
Field Details
-
TEST_FILE_PATH
- See Also:
-
TEST_FILE_OUT_PATH
- See Also:
-
-
Constructor Details
-
ImageEncodingDecodingTests
public ImageEncodingDecodingTests()
-
-
Method Details
-
testReadImageToBase64String
Tests the method to read in an image as a base64 string. Returns the string.- Returns:
- the converted image.
-
testReadingInImageAsBufferedImage
Tests the method to read in an image as a bufferedImage and returns that.- Returns:
- The image as BufferedImage or null if it cannot be read.
-
testReadingBase64AsString
Tests if a base64 String can be read in from a base64 file as used in this project.- Returns:
- the string from the file. It will be empty if the file cannot be read properly.
-
testReadBase64StringAsBufferedImage
Tests if a base64 file can be read and output as a BufferedImage.- Returns:
- image the buffered image derived from the input string.
-
testBufferedImageToBase64
Tests the conversion of bufferedImages to base64 Strings. Firstly reads in an imgae, converts it and tried to revert that.- Returns:
- The image string.
-
main
Testing main method.- Parameters:
args- args.
-