KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > dna > impl > ObjectDNAImplTest


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.dna.impl;
5
6 import com.tc.io.TCByteBufferOutputStream;
7 import com.tc.object.ObjectID;
8 import com.tc.object.dna.api.DNAWriter;
9
10 public class ObjectDNAImplTest extends DNAImplTest {
11
12   private long version = 69;
13
14   public void testSerializeDeserialize() throws Exception JavaDoc {
15     super.testSerializeDeserialize();
16     assertEquals(version, dna.getVersion());
17   }
18
19   protected void assertOverridable() {
20     assertFalse(dna.isDelta());
21   }
22
23   protected DNAImpl createDNAImpl(ObjectStringSerializer serializer, boolean b) {
24     return new ObjectDNAImpl(serializer, b);
25   }
26
27   protected DNAWriter createDNAWriter(TCByteBufferOutputStream out, ObjectID id, String JavaDoc type,
28                                       ObjectStringSerializer serializer, DNAEncoding encoding, String JavaDoc string) {
29     return new ObjectDNAWriterImpl(out, id, type, serializer, encoding, "loader description", version);
30   }
31
32 }
33
Popular Tags