KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > cache > marshall > CacheMarshaller200Test


1 /*
2  * JBoss, Home of Professional Open Source
3  *
4  * Distributable under LGPL license.
5  * See terms of license at gnu.org.
6  */

7 package org.jboss.cache.marshall;
8
9 import org.jboss.cache.RegionManager;
10
11 public class CacheMarshaller200Test extends CacheMarshallerTestBase
12 {
13    public CacheMarshaller200Test()
14    {
15       currentVersion = "2.0.0.GA";
16       currentVersionShort = 20;
17       expectedMarshallerClass = CacheMarshaller200.class;
18    }
19
20    public void testHandle140Stream() throws Exception JavaDoc
21    {
22       VersionAwareMarshaller marshallerOld = new VersionAwareMarshaller(new RegionManager(), false, false, "1.4.0.GA");
23
24       // create a '140' stream.
25

26       byte[] buf = marshallerOld.objectToByteBuffer("hello");
27       Object JavaDoc unmarshalled = marshaller.objectFromByteBuffer(buf);
28
29       assertEquals("hello", unmarshalled);
30    }
31
32 }
33
Popular Tags