| com.ibm.emb.junit.EMBTestCaseBase com.ibm.emb.test.MediaEntityLocalTest
MediaEntityLocalTest | public class MediaEntityLocalTest extends EMBTestCaseBase (Code) | |
Line Item: MEB API
Subcategory 1: javax.emb
Subcategory 2: MediaEntityLocal
|
Method Summary | |
protected void | setUp() | public void | testEMB100() | public void | testEMB101() | public void | testEMB102()
Testcase Name: convert(MediaConverterSpec[])
Testcase Number: EMB102
setup:
test procedure:
1.call convert(null)
expected result: NullPointerException
2.call convert(new MediaConverterSpec[0])
expected result: content unchanged
3.create Media entity from bmp image file and store getLastModified()
create 2 element array of converter specs:
(1) BmpToJpegConverterSpec
(2) JpegToBmpConverterSpec
call convert
expected result: media entity is a bmp image that is roughly the same size as original
getLastModified() should have changed
4.create Media entity from bmp image file
create 2 element array of converter specs with both being BmpToJpegConverterSpec
call convert
expected result: FormatSyntaxException
5.create Media entity from random content
create 1 element array of converter specs with element being BmpToJpegConverterSpec
call convert
expected result:FormatSyntaxException
6.create Media entity from nonexistent file and create 1 element array of
converter specs with BmpToJpegConverterSpec, call convert
expected result: ContentAccessException
7.create Media entity from jpeg file and create 1 element array of converter specs
with nonexistent converter (i.e. | public void | testEMB103() | public void | testEMB104() | public void | testEMB105() | public void | testEMB106() | public void | testEMB107() | public void | testEMB108() | public void | testEMB109() | public void | testEMB110() | public void | testEMB111() | public void | testEMB112() | public void | testEMB113() | public void | testEMB114() | public void | testEMB115() | public void | testEMB116() | public void | testEMB117() | public void | testEMB118() | public void | testEMB119() | public void | testEMB120() | public void | testEMB121() | public void | testEMB122() | public void | testEMB123() | public void | testEMB124() | public void | testEMB125() | public void | testEMB126() | public void | testEMB127() | public void | testEMB128() | public void | testEMB129() | public void | testEMB130() | public void | testEMB131() | public void | testEMB132() | public void | testEMB133() |
MediaEntityLocalTest | public MediaEntityLocalTest(String name) throws MediaException(Code) | | |
setUp | protected void setUp() throws RemoteException, CreateException(Code) | | initialization of test case (called before each test method)
|
testEMB100 | public void testEMB100() throws MediaException, IOException, InterruptedException, Throwable(Code) | |
Testcase Name: addListener(MediaListener)
Testcase Number: EMB100
setup:
test procedure:
1.create new media entity me1, call addListener(null)
expected result: NullPointerException
2.create new MediaListener listener1, call addListener(listener1)
expected result: no exception, call getListeners and check if there is only one element
3.create MediaListener listener2, call addListener(listener2)
expected result: no exception, call getListeners and check for two elements
4.call addListener(listener1)
expected result: no exception, call getListeners and check there is still two elements
|
testEMB101 | public void testEMB101() throws MediaException, CreateException, NamingException, IOException, FinderException, Throwable(Code) | |
Testcase Name: addMetaData(MetaDataEntityLocal)
Testcase Number: EMB101
setup: create Media entities me1 and me2
create meta data entities md1 and md2
test procedure:
1.call me1.addMetaData(null)
expected result: NullPointerException
2.call me1.addMetaData(md1)
expected result: no exception, call me1.getMetaData and check for one element
3.call me1.addMetaData(md2)
expected result: no exception, call me1.getMetaData and check for two elements
4.call me2.addMetaData(md1)
expected result: no exception, call me1.getMetaData and verify there are two elements
call me2.getMetaData and verify there is one element
|
testEMB102 | public void testEMB102() throws MediaException, NamingException, IOException, InterruptedException, Throwable(Code) | |
Testcase Name: convert(MediaConverterSpec[])
Testcase Number: EMB102
setup:
test procedure:
1.call convert(null)
expected result: NullPointerException
2.call convert(new MediaConverterSpec[0])
expected result: content unchanged
3.create Media entity from bmp image file and store getLastModified()
create 2 element array of converter specs:
(1) BmpToJpegConverterSpec
(2) JpegToBmpConverterSpec
call convert
expected result: media entity is a bmp image that is roughly the same size as original
getLastModified() should have changed
4.create Media entity from bmp image file
create 2 element array of converter specs with both being BmpToJpegConverterSpec
call convert
expected result: FormatSyntaxException
5.create Media entity from random content
create 1 element array of converter specs with element being BmpToJpegConverterSpec
call convert
expected result:FormatSyntaxException
6.create Media entity from nonexistent file and create 1 element array of
converter specs with BmpToJpegConverterSpec, call convert
expected result: ContentAccessException
7.create Media entity from jpeg file and create 1 element array of converter specs
with nonexistent converter (i.e. JpegToMpegConverterSpec)
expected result: ConversionException
8.create Media entity from jpeg file
call convert(new MediaConverterSpec[]{null, null})
expected result: ConversionException
9.create Media entity from jpeg file
call convert(new MediaConverterSpec[]{JpegToBmpConverterSpec})
expected result: entity is converted to bmp, check format and file extension changed
getLastModified updated
10.create Media entity from bmp file and create instance of Media listener
call me1.addListener(listener)
call convert(new MediaConverterSpec[]{BmpToJpegConverterSPec})
expected result: ListenerVetoException
11.create Media entity and setLocation
call me.convert(new MediaConverterSpec[]{JpegToBmpConverterSpec})
expected result: ContentUnmutableException
|
testEMB103 | public void testEMB103() throws MediaException, IOException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: exportMedia(URL)
Testcase Number: EMB103
setup:
test procedure:
1.call exportMedia(null)
expected result: media exported to default location which is not null
2.create Media entity from nonexistent file and call exportMedia to valid location
expected result: ContentAccessException
3.call rebind("jpg", new JpegFormat())
create Media entity from jpeg file and call exportMedia with valid location
expected result: no exception, access file at new location and verify instance of JpegFormat
4.call rebind("gpl", new GenericPlaylistFormat())
create Media entity from playlist and call exportMedia with valid location
expected result: no exception, access file at new location and verify instance of GenericPlaylistFormat
|
testEMB104 | public void testEMB104() throws MediaException, MalformedURLException, IOException, CreateException, NamingException, FinderException, Throwable(Code) | |
Testcase Name: getChildren()
Testcase Number: EMB104
setup: create Media entity from embedded media file, call me1
create Media entity from nonembedded media file, call me2
test procedure:
1.call me1.getChildren()
expected result: empty array
2.call me2.getChildren()
expected result: array containing all the MediaEntities which are referenced within me2
|
testEMB105 | public void testEMB105() throws IOException, MediaException, Exception(Code) | |
Testcase Name: getContent()
Testcase Number: EMB105
setup:
test procedure:
1.rebind("test", new GenericMediaFormat), create media entity and set content to random content with size of maxMediaSize
call getContent()
expected result: ContentTooLargeException
2.create small media entity, call getContent(), compare content with file content
expected result: content and file content are equal
3.create testInstance from nonexistent file and call getContent()
expected result: ContentAccessException
|
testEMB106 | public void testEMB106() throws IOException, MediaException, CreateException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getDescription()
Testcase Number: EMB106
setup: create Media entity from media file
test procedure:
1.call setDescription with random string
call getDescription
expected result: returned string matches original
|
testEMB107 | public void testEMB107() throws IOException, MediaException, Exception(Code) | |
Testcase Name: getFormat()
Testcase Number: EMB107
setup:
test procedure:
1.rebind("jpg", new JpegFormat()), create random content file with name test.jpg
create MediaBean from file, run getFormat()
expected result: not null and instance of JpegFormat
2.unbind("xxx") catch FormatNotFoundException
create random content file with name test.xxx, create MediaBean from file, run getFormat()
expected result: FormatNotFoundException
|
testEMB108 | public void testEMB108() throws IOException, MediaException, Exception(Code) | |
Testcase Name: getHeader()
Testcase Number: EMB108
setup:
test procedure:
1.rebind("jpg",new JpegFormat()), create media entity with name test.jpg
set content with jpg file and call getHeader
expected result: return value not null and equals getFormat().extractHeader()
2.unbind("xxx") catch FormatNotFoundException
create media entity, set name to "test.xxx" and set content to random content, run getHeader()
expected result: FormatNotFoundException is thrown
3.create file from random content, run getHeader()
expected result: FormatSyntaxException
4.use static byte array to create BMP file (contains unsupported version) and run getHeader()
expected result: FormatFeatureException
|
testEMB109 | public void testEMB109() throws IOException, MediaException, InterruptedException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getLastModified()
Testcase Number: EMB109
setup: create Media entity from media file
test procedure:
1.call getLastModified()
expected result: no exception
2.call getLastModified and remember timestamp
call setDescription("abc") and wait 2 seconds
call getLastModified and verify it changed
expected result: timestamp updated
|
testEMB110 | public void testEMB110() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getListeners()
Testcase Number: EMB110
setup: create Media entity from media file
create Media listeners listener1, listener2, and listener3
test procedure:
1.call addListener(listener1), call addListener(listener2), call addListener(listener3)
call getListeners()
expected result: verify that listener1, listener2, and listener 3 are in array
|
testEMB111 | public void testEMB111() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getLocation()
Testcase Number: EMB111
setup: create Media entity
test procedure:
1.call getLocation()
expected result: null
2.call setLocation()
call getLocation()
expected result: URL matches original random URL
|
testEMB112 | public void testEMB112() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getMetaData()
Testcase Number: EMB112
setup: create Media entity me1 and meta data entities md1 and md2
test procedure:
1.call me1.addMetaData(md1)
call me1.getMetaData()
expected result: 1 element array consisting of md1
2.call me1.addMetaData(md2)
call me1.getMetaData()
expected result: 2 element array consisting of md1 and md2
|
testEMB113 | public void testEMB113() throws IOException, MediaException, Exception(Code) | |
Testcase Name: getMimeType()
Testcase Number: EMB113
setup:
test procedure:
1.rebind("jpg", new JpegFormat())
create media entity from jpg file, run getMimeType()
expected result: result equals getFormat().getDefaultMimeType()
2.create random content file with name test.test, create media entity from file with mimetype "test", run getMimeType()
expected result: result is "test"
3.create media entity from jpg file
then call unbind("jpg")
call getMimeType
expected result: FormatNotFound
|
testEMB114 | public void testEMB114() throws IOException, RemoveException, CreateException, RemoteException, NamingException, FinderException, MediaException(Code) | |
Testcase Name: getName()
Testcase Number: EMB114
setup:
test procedure:
1.rebind("jpg", new JpegFormat()), create random content file with name test.jpg, create MediaBean from file with mimetype null, run getName()
expected result: result is not null and contains a '.'
|
testEMB115 | public void testEMB115() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getNextVersion()
Testcase Number: EMB115
setup: create Media entities me1 and me2
test procedure:
1.call me2.setPreviousVersion(me1)
call me1.getNextVersion()
expected result: return me2
2.call me2.getNextVersion()
expected result: null
|
testEMB116 | public void testEMB116() throws MediaException, IOException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getParents()
Testcase Number: EMB116()
setup: create Media entity from embedded media file, call me1
create Media entity from nonembedded media file, call me2
test procedure:
1.call me1.getParent()
expected result: empty array
2.call me2.getChildren()
for all children, call getParents()
expected result: me2
|
testEMB117 | public void testEMB117() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getPreviousVersion()
Testcase Number: EMB117
setup: create Media entities me1 and me2 from media files
test procedure:
1.call me2.setPreviousVersion(me1)
call me2.getPreviousVersion
expected result: me1
2.call me1.getPreviousVersion()
expected result: null
|
testEMB118 | public void testEMB118() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: getProxy()
Testcase Number: EMB118
setup: create Media entities me1 and me2 from media jpeg files
test procedure:
1.call me1.getProxy()
expected result: not null
2.call me1.setProxy(me2)
call me1.getProxy()
expected result: me2
|
testEMB119 | public void testEMB119() throws IOException, MediaException, Exception(Code) | |
Testcase Name: getSize()
Testcase Number: EMB119
setup:
test procedure:
1.create random content file with name test.jpg and content size 1024, create MediaBean from file, run getSize()
expected result: result is 1024
|
testEMB120 | public void testEMB120() throws IOException, MediaException, InterruptedException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: importMedia(URL, String)
Testcase Number: EMB120
setup: create Media entity me1 from jpeg media file
rebind "jpg" and "bmp" file extensions to media format registry
test procedure:
1.call me1.importMedia(null, null)
expected result: NullPointerException
2.a.create media entity and call setName
call me1.importMedia(validLocation, null)
expected result: no exception, call me1.getContent and verify media content and format
verify name remained the same
b.create media entity and call importMedia(validLocation, null)
expected result: no exception, call getContent and verify content and format
check that getName is not null
3.create URL from valid jpeg file location
call me1.importMedia(location, randomName) where randomName has the "jpg" file extension
expected result: no exception
call me1.getContent and me1.getName to verify new content and name
4.create URL from valid bmp file location
call me1.importMedia(location, randomName) where randomName has the "bmp" file extension
expected result: no exception
call me1.getFormat() and verify instance of BmpFormat
5.create URL from nonexistent file location
call me1.importMedia(location, null)
expected result: ContentAccessException
6.create URL pointing to valid playlist location
call me1.importMedia(location, randomName) where randomName has the "gpl" file extension
expected result: no exception
verify getChildren is not null
7.create media entity, call setName and setContent
call addListener
call importMedia(validLocation, name)
expected result: ListenerVetoException
8.create media entity and setName
call importMedia with URL pointing to file larger than maxMediaSize
expected result: ContentTooLargeException
|
testEMB121 | public void testEMB121() throws IOException, MediaException, Exception(Code) | |
Testcase Name: readContent(long position, byte[] buffer)
Testcase Number: EMB121
setup: create file (1024 byte), rebind("test", new GenericMediaFormat()), create MediaBean
create byte array buffer of size 1024 bytes
test procedure:
1.call readContent(-1,testBuffer)
expected result: IndexOutOfBoundsException
2.call readContent(1025,testBuffer)
expected result: IndexOutOfBoundsException
3.call readContent(0,null)
expected result: NullPointerException
4.call readContent(10,testBuffer) with buffer size 100 bytes
compare to media content offset 10, length of return value
expected result: same content
5.call readContent(1024,testBuffer)
expected result: -1 returned with empty buffer
6.create testInstance from nonexistent file and call readContent(0,buffer)
expected result: ContentAccessException
7.create testInstance of size 100 bytes and buffer of size 1024 bytes
call readContent(0,testBuffer) and compare content of media and buffer
expected result: buffer partially filled (return value is the length)
|
testEMB122 | public void testEMB122() throws IOException, MediaException, Throwable(Code) | |
Testcase Name: readContent(long position, byte[] buffer, int offset, int length)
Testcase Number: EMB122
setup: create file (1024 byte), rebind("test", new GenericMediaFormat()), create MediaBean
create byte array buffer of size 1024 bytes
test procedure:
1.call readContent(-1,testBuffer,0,1024)
expected result: IndexOutOfBoundsException
2.call readContent(1025,testBuffer,0,1024)
expected result: IndexOutOfBoundsException
3.call readContent(0,testBuffer,-1,1024)
expected result: IndexOutOfBoundsException
4.call readContent(0,testBuffer,1025,1024)
expected result: IndexOutOfBoundsException
5.call readContent(0,testBuffer,0,-1)
expected result: NegativeIndexArrayException
6.call readContent(0,null,0,1024)
expected result: NullPointerException
7.create testInstance from nonexistent file and call readContent(0,testBuffer,0,1024)
expected result: ContentAccessException
8.call readContent(0,testBuffer,0,1024) (loop to fill buffer)
compare with file content
expected result: same content
9.call readContent(512,testBuffer,0,1024)
expected result: buffer partially filled with 512 bytes matching last 512 bytes
of media content (could be less if nonblocking)
10.call readContent(1024,testBuffer,0,1024)
expected result: return -1 with empty buffer
11.call readContent(0,testBuffer,100,924), compare buffer offset 100 with media content
(use return value as length)
expected result: same content
12.call readContent(200,testBuffer,100,100), compare buffer offset 100 with file offset 200
(use return value as length)
expected result: same content
13.call readContent(0,testBuffer,0,1048), compare buffer with file content
expected result: same content and no exceptions
|
testEMB123 | public void testEMB123() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: removeListener(MediaListener)
Testcase Number: EMB123
setup: create Media entity me1 and media listener listener1
test procedure:
1.call removeListener(null)
expected result: NullPointerException
2.call me1.addListener(listener1), call me1.getListeners() and verify listener is added
call me1.removeListener(listener1), call me1.getListeners() and verify listener is removed
expected result: listener1 is removed
3.create media listener listener 2
call me1.removeListener(listener2)
expected result: no action and no exception
|
testEMB124 | public void testEMB124() throws CreateException, IOException, MediaException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: removeMetaData(MetaDataEntityLocal)
Testcase Number: EMB124
setup: create Media entity me1 and meta data entity md1
test procedure:
1.call removeMetaData(null)
expected result: NullPointerException
2.call me1.addMetaData(md1), call me1.getMetaData() and verify meta data is added
call me1.removeMetaData(md1), call me1.getMetaData() and verify md1 is removed
expected result: md1 is removed
3.create meta data entity md2
call me1.removeMetaData(md2)
expected result: no exception
|
testEMB125 | public void testEMB125() throws MalformedURLException, IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setChildren(MediaEntityLocal[] children)
Testcase Number: EMB125
setup:
test procedure:
1.call setChildren(null)
expected result: NullPointerException
2.call setChildren(new MediaEntityLocal[] {null})
expected result: NullPointerException
3.create nonembedded media with 1 child
call setChildren with only 2 children passed in
expected result: IllegalArgumentException
4.create nonembedded media with 1 child
call setChildren(new MediaEntityLocal[0])
expected result: IllegalArgumentException
5.create nonembedded media and set location
call setChildren
expected result: ContentUnmutableException
6.create embedded media and call setChildren(new MediaEntityLocal[0])
expected result: no exception
7.create nonembedded media with 1 child
call setChildren(new MediaEntityLocal[] {child})
expected result: no exception and child content is updated
8.create nonembedded media with no content
create child and call setChildren
expected result: ContentAccessException
|
testEMB126 | public void testEMB126() throws MalformedURLException, MediaException, IOException, InterruptedException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setContent(byte[])
Testcase Number: EMB126
setup: create Media entity me1 from bmp media file
test procedure:
1.call setContent(null)
expected result: no exception
2.call getLastModified() and remember timestamp
call setContent() with testPicture2.bmp
call getContent()
wait 2 seconds
expected result: content of new file
call getLastModified() and check if timestamp changed
call getFormat and check it has not changed
3.call setContent with testPicture1.jpg
expected result: FormatSyntaxException (format change)
4.create Media entity from nonembedded media
call getLastModified and remember timestamp
call setContent with testPlaylist1.gpl
wait 2 seconds
call getContent
expected result: content matches testPlaylist1
call getChildren and check empty array is returned
call getLastModified and check timestamp has changed
5.call setName("testPicture1.jpg")
call setContent with testPicture1.jpg
expected result: no exception
call getContent and verify new content and format change
6.create media listener and call me1.addListener(listener)
call setContent with testPicture1.bmp
expected result: ListenerVetoException
7.create media entity and call setName
call setContent with byte array larger than maxMediaSize
expected result: ContentTooLargeException
|
testEMB127 | public void testEMB127() throws IOException, MediaException, InterruptedException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setContent(InputStream)
Testcase Number: EMB127
setup: create Media entity me1 from bmp media file
test procedure:
1.call setContent(null)
expected result: NullPointerException
2.call getLastModified() and remember timestamp
call setContent() with testPicture2.bmp
call getContent()
wait 2 seconds
expected result: content of new file
call getLastModified() and check if timestamp changed
call getFormat and check it has not changed
3.call setContent with testPicture1.jpg
expected result: FormatSyntaxException (format change)
4.create Media entity from nonembedded media
call getLastModified and remember timestamp
call setName("testPlaylist1.gpl")
call setContent with testPlaylist1.gpl
wait 2 seconds
call getContent
expected result: content matches testPlaylist1
call getChildren and check empty array is returned
call getLastModified and check timestamp has changed
5.call setName("testPicture1.jpg")
call setContent with testPicture1.jpg
expected result: no exception
call getContent and verify new content and format change
6.create media listener and call me1.addListener(listener)
call setContent with testPicture1.bmp
expected result: ListenerVetoException
7.create media entity and call setName
call setContent with file larger than maxMediaSize
expected result: ContentTooLargeException
|
testEMB128 | public void testEMB128() throws MediaException, IOException, InterruptedException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase name: setDescription(String)
Testcase Number: EMB128
setup: create Media entity from embedded media file
test procedure:
1.call setDescription(null)
expected result: NullPointerException
2.call setDescription("")
expected result : no exception
3.call getLastModified() and remember timestamp
call setDescription("abc")
wait 2 secs and call getDescription
expected result: "abc" and verify timestamp has changed
4.create media listener and call addListener(listener)
call setDescription("")
expected result: ListenerVetoException
|
testEMB129 | public void testEMB129() throws MediaException, IOException, InterruptedException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setLocation(URL)
Testcase Number: EMB129
setup: create Media entity using instance of MediaEntityLocalHome
test procedure:
1.call setLocation(null)
call getLocation
expected result: null
2.call getLastModified() and remember timestamp
call setLocation(valid local location URL)
wait 2 seconds and call getLocation
expected result: URL equal to new location and timestamp was updated
3.create media listener and call addListener(listener)
call setLocation(valid URL)
expected result: ListenerVetoException
4.call setContent with byte array from testPicture1.jpg
call setLocation(valid URL)
expected result: LocationUnmutableException
|
testEMB130 | public void testEMB130() throws MalformedURLException, InterruptedException, MediaException, IOException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setMimeType(String)
Testcase Number: EMB130
setup: create Media entity from embedded media file
test procedure:
1.call setMimeType(null)
expected result: NullPointerException
2.call getLastModified() and remember timestamp
call setMimeType("www/unknown")
wait 2 seconds and call check getMimeType()
expected result: mime type equal to "www/unknown" and timestamp updated
3.create media listener and call addListener(listener)
call setMimeType("image/bmp");
expected result: ListenerVetoException
|
testEMB131 | public void testEMB131() throws IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setName()
Testcase Number: EMB131
setup: create Media entity from jpg media file
rebind jpg to format registry
test procedure:
1.call setName(null)
expected result: NullPointerException
2.call setName with random string and file extension
expected result: IllegalArgumentException
3.call setName with string and random file extension (no invalid characters)
expected result: FormatNotFoundException
4.call setName with random string and jpeg file extension
call getName
expected result: name matches random string
5.create media listener and call addListener(listener)
call setName("test.jpg")
expected result: ListenerVetoException
|
testEMB132 | public void testEMB132() throws MalformedURLException, IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setPreviousVersion(MediaEntityLocal)
Testcase Number: EMB132
setup: create Media entities me1, me2, and me3 from embedded media files
test procedure:
1.call me1.setPreviousVersion(null)
call me1.getPreviousVersion() and me1.getNextVersion()
expected result: both are null
2.call me2.setPreviousVersion(me1)
expected result: me1.getPreviousVersion() is null
me1.getNextVersion() is me2
me2.getPreviousVersion() is me1
me2.getNextVersion() is null
3.call me2.setPreviousVersion(me1)
expected result: no exception
4.call me3.setPreviousVersion(me1)
expected result: VersionIntegrityException
5.call me2.setPreviousVersion(me3)
expected result: VersionIntegrityException
6.call me1.setPreviousVersion(me3)
expected result: VersionIntegrityException
7.call me3.setPreviousVersion(null)
expected result: no exception
8.call me3.setPreviousVersion(me2)
expected result: me1.getPreviousVersion() is null
me1.getNextVersion() is me2
me2.getPreviousVersion() is me1
me2.getNextVersion() is me3
me3.getPreviousVersion() is me2
me3.getNextVersion() is null
9.call me2.setPreviousVersion(null)
expected result: VersionIntegrityException
10.call me3.setPreviousVersion(null)
expected result: me1.getPreviousVersion() is null
me2.getPreviousVersion() is me1
me2.getNextVersion() is null
me3.getPreviousVersion() is null
me3.getNextVersion() is null
|
testEMB133 | public void testEMB133() throws MalformedURLException, InterruptedException, IOException, MediaException, CreateException, RemoteException, NamingException, FinderException, RemoveException(Code) | |
Testcase Name: setProxy(MediaEntityLocal)
Testcase Number: EMB133
setup: create Media entites me1 and me2 from embedded media files
test procedure:
1.call me1.setProxy(me2)
call me1.getProxy()
expected result: me2
2.call me2.setProxy(null)
call me2.getProxy()
expected result: not null and not me2
3.call me1.setProxy(me2)
call me2.setProxy(me1)
call me1.setProxy(me1)
expected result: no exception
|
|
|