| com.ibm.emb.junit.EMBTestCaseBase com.ibm.emb.test.MediaFormatTest
All known Subclasses: com.ibm.emb.test.GenericMediaFormatTest, com.ibm.emb.test.mfb.GenericPlayListTest, com.ibm.emb.test.mfb.EmbeddedMediaFormatTest,
MediaFormatTest | abstract public class MediaFormatTest extends EMBTestCaseBase (Code) | |
Line Item: MFB API
Subcategory 1: javax.emb
Subcategory 2: MediaFormat
This abstract class provides test methods for all methods described in the interface
MediaFormat.
For testing implementations of this interface one needs to create a Tester
class which extends this abstract class.
|
Method Summary | |
abstract public MediaFormat | createMediaFormat() | public static Test | stdSuite(String TestCaseImplementor) | public void | testEMB013() | public void | testEMB014() | public void | testEMB015()
Testcase Name: extractHeader(InputStream content)
Testcase Number: EMB015
setup:
test procedure:
1.call extractHeader(null)
expected result: NullPointerException
2.create input stream from random content and call extractHeader with input stream
possible results:
a) not null...instance of GenericMediaHeader
b) FormatSyntaxException
c) FormatFeatureException
d) fail... | public void | testEMB016() | public void | testEMB017() | public void | testEMB018() | public void | testEMB019() |
MediaFormatTest | public MediaFormatTest(String name) throws MediaException(Code) | | |
createMediaFormat | abstract public MediaFormat createMediaFormat()(Code) | | abstract method to create an instance of MediaFormat this method needs to
be implemented in the test subclass and will create an instance of the
concrete implementation of the class under test
|
stdSuite | public static Test stdSuite(String TestCaseImplementor)(Code) | | stdSuite method of this test class instantiates all tests necesssary to
for the standard compliance tests
Parameters: String - complete class Name of the implementor of the abstract test |
testEMB013 | public void testEMB013() throws MediaException, IOException(Code) | |
Testcase Name: assembleContent(URL, MediaSegment[])
Testcase Number: EMB013
setup:
test procedure:
1.call assembleContent with null as segment array and null as location
expected result: NullPointerException
2.call assembleContent with empty segment array and null as location
expected result: empty byte array result
3.create 1 element segment array containing a null element
call assembleContent with the segment array created and null as location
expected result: NullPointerException
4.create 1 element segment array, fill in random content and null as child location
call assembleContent with the segment array created and null as location
expected result: content equal to the random content passed with the segment array
5.create several MediaSegments (combined size=2GB) and store in MediaSegment array
call assembleContent
expected result: ContentTooLargeException
6.create 1 element segment array with random content and invalid childLocation
call assembleContent with segment array and null location
expected result: if (isEmbedded) -> FormatSyntaxException
if (!isEmbedded) -> LinkTranslationException
7.crate 2 element segemnt array with random content and null childLocation
call assembleContent
expected result: if (isEmbedded) -> FormatSyntaxException
if (!isEmbedded) -> byte array not null
8.create 1 element array with random content and random childLocation
call assembleContent
expected result: if (isEmbedded) -> FormatSyntaxException
if (!isEmbedded) ->byte array not null
|
testEMB014 | public void testEMB014() throws MediaException, IOException, ClassNotFoundException, IllegalAccessException, InstantiationException(Code) | |
Testcase Name: disassembleContent(URL, byte[])
Testcase Number: EMB014
setup:
test procedure:
1.call disassembleContent with null as mediaContent and null as location
expected result: NullPointerException
2.create byte array with random content, call disassembleContent with null location
expected result: if (isEmbedded)
-> 1 element segment array OR
-> FormatSyntaxException
if (!isEmbedded)
-> multiple element segment array OR
-> FormatSyntaxException OR
-> LinkTranslationException
3.retrieve property file for nonembedded media
use sample media file and call disassembleContent
call assembleContent on returned media segment array
expected result: returned content should be same format as original
and roughly the same size
|
testEMB015 | public void testEMB015() throws MediaException, IOException(Code) | |
Testcase Name: extractHeader(InputStream content)
Testcase Number: EMB015
setup:
test procedure:
1.call extractHeader(null)
expected result: NullPointerException
2.create input stream from random content and call extractHeader with input stream
possible results:
a) not null...instance of GenericMediaHeader
b) FormatSyntaxException
c) FormatFeatureException
d) fail...
<pre>
|
testEMB016 | public void testEMB016() throws MediaException, IOException(Code) | |
Testcase Name: extractProxy(InputStream content)
Testcase Number: EMB016
setup:
test procedure:
1.call extractProxy(null)
expected result: NullPointerException
2.create instance of MediaFormat, bind("jpg", new JpegFormat())
call extractProxy with "test.jpg"
expected result: not null
|
testEMB017 | public void testEMB017() throws MediaException(Code) | |
Testcase Name: getDefaultMimeType()
Testcase Number: EMB017
setup:
test procedure:
1.call getDefaultMimeType
expected result: result is not null and not an empty string
|
testEMB018 | public void testEMB018()(Code) | |
Testcase Name: isEmbedded()
Testcase Number: EMB018
setup:
test procedure:
1.create MediaFormat using abstract create method
call isEmbedded()
expected result: no exeception and result is either true or false
|
testEMB019 | public void testEMB019()(Code) | |
Testcase Name: isStreamingDesirable()
Testcase Number: EMB019
setup:
test procedure:
1.create MediaFormat using abstract create method
call isStreamingDesireable()
expected result: no exeception and result is either true or false
|
|
|