Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 196851 Details for
Bug 347580
IResourceManager#register( String, InputStream ) behaves different from #register(String)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Test cases to demonstrate the described behavior
clipboard.txt (text/plain), 2.16 KB, created by
RĂ¼diger Herrmann
on 2011-05-29 11:57:53 EDT
(
hide
)
Description:
Test cases to demonstrate the described behavior
Filename:
MIME Type:
Creator:
RĂ¼diger Herrmann
Created:
2011-05-29 11:57:53 EDT
Size:
2.16 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.rap.rwt.test >Index: src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java >=================================================================== >RCS file: /cvsroot/rt/org.eclipse.rap/runtime.rwt.test/org.eclipse.rap.rwt.test/src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java,v >retrieving revision 1.19 >diff -u -r1.19 ResourceManagerImpl_Test.java >--- src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java 29 May 2011 15:38:02 -0000 1.19 >+++ src/org/eclipse/rwt/internal/resources/ResourceManagerImpl_Test.java 29 May 2011 15:57:21 -0000 >@@ -153,6 +153,18 @@ > assertFalse( "Resource must not be written twice", jarFile.exists() ); > } > >+ public void testRegistrationForDiskWithInputStreamIsIdempotent() { >+ IResourceManager manager = getResourceManager( DELIVER_FROM_DISK ); >+ String resource = TEST_RESOURCE_1_JAR; >+ manager.register( resource, openStream( TEST_RESOURCE_1_JAR ) ); >+ clearTempFile(); >+ File jarFile = getResourceCopyFile( resource ); >+ >+ manager.register( resource, openStream( TEST_RESOURCE_1_JAR ) ); >+ >+ assertFalse( "Resource must not be written twice", jarFile.exists() ); >+ } >+ > public void testRegistrationServletWithNotExistingResource() { > IResourceManager manager = getResourceManager( DELIVER_BY_SERVLET ); > String doesNotExist = "doesNotExist"; >@@ -213,6 +225,17 @@ > assertFalse( "Resource must not be written twice", tmpFile.exists() ); > } > >+ public void testRegistrationForServletTempDirWithInputStreamIsIdempotent() { >+ ResourceManagerImpl manager = getResourceManager( DELIVER_BY_SERVLET ); >+ String resourceName = "resource-name"; >+ manager.register( resourceName, new ByteArrayInputStream( new byte[] { 1 } ) ); >+ manager.register( resourceName, new ByteArrayInputStream( new byte[] { 2 } ) ); >+ >+ byte[] registeredBytes = manager.findResource( resourceName, null ); >+ >+ assertEquals( 1, registeredBytes[ 0 ] ); >+ } >+ > public void testRegistrationWithNullParams() { > IResourceManager manager = getResourceManager( DELIVER_FROM_DISK ); > try {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 347580
: 196851