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 87680 Details for
Bug 216311
ITD fields on interfaces end up transient with annotation style
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
The serialization test case (JUnit 4)
PersistabilityTest.java (text/java-source), 1.06 KB, created by
Guillaume Lasnier
on 2008-01-23 12:49:06 EST
(
hide
)
Description:
The serialization test case (JUnit 4)
Filename:
MIME Type:
Creator:
Guillaume Lasnier
Created:
2008-01-23 12:49:06 EST
Size:
1.06 KB
patch
obsolete
> > >import java.io.ByteArrayInputStream; >import java.io.ByteArrayOutputStream; >import java.io.ObjectInputStream; >import java.io.ObjectOutputStream; > >import org.junit.Assert; >import org.junit.Test; > >public class PersistabilityTest { > > @Test > public void testSerialization() throws Exception { > > PersistabilityTest persistabilityTest1 = new PersistabilityTest(); > ByteArrayOutputStream bos = new ByteArrayOutputStream(); > ObjectOutputStream oos = new ObjectOutputStream(bos); > > oos.writeObject(persistabilityTest1); > > ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray()); > ObjectInputStream ois = new ObjectInputStream(bis); > > PersistabilityTest persistabilityTest2 = (PersistabilityTest) ois.readObject(); > > Assert.assertTrue(persistabilityTest1 instanceof IPersistable); > Assert.assertTrue(persistabilityTest2 instanceof IPersistable); > > Assert.assertEquals(((IPersistable) persistabilityTest1).getId(), ((IPersistable) persistabilityTest2).getId()); > > } >}
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 Raw
Actions:
View
Attachments on
bug 216311
:
87678
|
87679
| 87680