Java Doc for MediaFormatTest.java in  » J2EE » JOnAS-4.8.6 » com » ibm » emb » test » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » JOnAS 4.8.6 » com.ibm.emb.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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.
 



Constructor Summary
public  MediaFormatTest(String name)
    

Method Summary
abstract public  MediaFormatcreateMediaFormat()
    
public static  TeststdSuite(String TestCaseImplementor)
    
public  voidtestEMB013()
    
public  voidtestEMB014()
    
public  voidtestEMB015()
    
 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  voidtestEMB016()
    
public  voidtestEMB017()
    
public  voidtestEMB018()
    
public  voidtestEMB019()
    


Constructor Detail
MediaFormatTest
public MediaFormatTest(String name) throws MediaException(Code)




Method Detail
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
 



Fields inherited from com.ibm.emb.junit.EMBTestCaseBase
protected EMBTestConfiguration embTestConfig(Code)(Java Doc)

Methods inherited from com.ibm.emb.junit.EMBTestCaseBase
public static byte[] getByteArrayFromFile(File arg) throws IOException(Code)(Java Doc)
public void logProductError(String msg)(Code)(Java Doc)
public static void removeFilesInDir(File srcDir) throws IOException(Code)(Java Doc)
protected void setUp() throws Exception(Code)(Java Doc)
public void succeed(String msg)(Code)(Java Doc)
public void succeed()(Code)(Java Doc)
protected void tearDown() throws Exception(Code)(Java Doc)
public void testError(String msg)(Code)(Java Doc)
public void testLog(String msg)(Code)(Java Doc)
public void testTrace(String msg)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.