| com.ibm.emb.test.MediaConverterTest com.ibm.emb.test.mfb.ImageConverterTest
ImageConverterTest | public ImageConverterTest(String name) throws MediaException(Code) | | constructor
|
createMediaConverter | public MediaConverter createMediaConverter() throws MediaException(Code) | | creates an instance of ImageConverter with the given Parameters used in
super class of ImageConverterTest
|
setUp | protected void setUp()(Code) | | do initialisation here
|
tearDown | protected void tearDown()(Code) | | freeup resources
|
testTEMB0100SBA | public void testTEMB0100SBA() throws MediaException, IOException(Code) | |
Testcase Name: convert(InputStream)
Testcase Number: TEMB0100SBA
Test 1:
create BmpToJpegConverterSpec
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on a bmp media
create MediaBean with conversion result
close FileInputStream and result stream
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
Test 2:
iterate over possible BMP color depths: 32, 24, 16, 8, 4, 1 {
create JpegToBmpConverterSpec, specify color depth
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on a jpg media file
create MediaBean with conversion result
close FileInputStream and result stream
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
Test 3:
iterate over crop factors (0.4, 1.0, 2.5) and input files ( test.bmp , test.jpg ) {
create ImageResizeConverterSpec, pass crop factor
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on input file
create MediaBean with conversion result
close FileInputStream and result stream
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
Test 4:
iterate over crop factor pairs (0.4/2.5, 1.0/1.0, 2.5/0.4) and input files (test.bmp, test.jpg ) {
create ImageResizeConverterSpec, pass crop factor pair (horizontal/vertical)
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on input file
create MediaBean with conversion result
close FileInputStream and result stream
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
}
}
|
testTEMB0101SBA | public void testTEMB0101SBA() throws MediaException, IOException(Code) | |
Testcase Name: convert(InputStream, OutputStream)
Testcase Number: TEMB0101SBA
Test 1:
create BmpToJpegConverterSpec
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on test.bmp, FileOutputStream on temporary file
close FileInputStream and FileOutputStream
create MediaBean with temporary file
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
Test 2:
iterate over possible BMP color depths: 32, 24, 16, 8, 4, 1 {
create JpegToBmpConverterSpec, specify color depth
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on test.jpg, OutputStream on temporary file
close FileInputStream and FileOutputStream
create MediaBean with temporary file
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
}
Test 3:
iterate over crop factors (0.4, 1.0, 2.5) and input files (test.bmp, test.jpg) {
create ImageResizeConverterSpec, pass crop factor
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on input file, OutputStream on temporary file
close FileInputStream and FileOutputStream
create MediaBean with temporary file
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
}
Test 4:
iterate over crop factor pairs (0.4/2.5, 1.0/1.0, 2.5/0.4) and input files (test.bmp,test.jpg) {
create ImageResizeConverterSpec, pass crop factor pair (horizontal/vertical)
query converter instance from converter spec using getConverter()
call convert(InputStream) of converter passing FileInputStream on input file, OutputStream on temporary file
close FileInputStream and FileOutputStream
create MediaBean with temporary file
--> check for no exceptions
--> call getHeader() on media bean and check for no exceptions to verify format
}
|
|
|