/** * Verify null for null. * <p> * @throws Exception */ public void testgGetDeSerializedCacheElement_null() throws Exception { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElementSerialized<String, String> before = null; // DO WORK ICacheElement<String, String> result = SerializationConversionUtil.getDeSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
assertNotNull( "Should have a serialized object.", serialized ); assertNotNull( "Should have a deserialized object.", after ); assertEquals( "Values should be the same.", before.getVal(), after.getVal() ); assertEquals( "Attributes should be the same.", before.getElementAttributes().getMaxLife(), after .getElementAttributes().getMaxLife() ); assertEquals( "Keys should be the same.", before.getKey(), after.getKey() ); assertEquals( "Cache name should be the same.", before.getCacheName(), after.getCacheName() );
fail( "We should have received an IOException." );
assertNotNull( "Should have a serialized object.", serialized ); assertNotNull( "Should have a deserialized object.", after ); assertEquals( "Values should be the same.", before.getVal(), after.getVal() ); assertEquals( "Attributes should be the same.", before.getElementAttributes().getMaxLife(), after .getElementAttributes().getMaxLife() ); assertEquals( "Keys should be the same.", before.getKey(), after.getKey() ); assertEquals( "Cache name should be the same.", before.getCacheName(), after.getCacheName() );
fail( "We should have received an IOException." );
assertNotNull( "Should have a serialized object.", serialized ); assertNotNull( "Should have a deserialized object.", after ); assertEquals( "Values should be the same.", before.getVal(), after.getVal() ); assertEquals( "Attributes should be the same.", before.getElementAttributes().getMaxLife(), after .getElementAttributes().getMaxLife() ); assertEquals( "Keys should be the same.", before.getKey(), after.getKey() ); assertEquals( "Cache name should be the same.", before.getCacheName(), after.getCacheName() );
/** * Verify null for null. * <p> * @throws IOException */ public void testgGetSerializedCacheElement_null() throws IOException { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElement<String, String> before = null; // DO WORK ICacheElementSerialized<String, String> result = SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
assertNotNull( "Should have a serialized object.", serialized ); assertNotNull( "Should have a deserialized object.", after ); assertEquals( "Values should be the same.", before.getVal(), after.getVal() ); assertEquals( "Attributes should be the same.", before.getElementAttributes().getMaxLife(), after .getElementAttributes().getMaxLife() ); assertEquals( "Keys should be the same.", before.getKey(), after.getKey() ); assertEquals( "Cache name should be the same.", before.getCacheName(), after.getCacheName() );
/** * Verify null for null. * <p> * @throws Exception */ public void testgGetDeSerializedCacheElement_null() throws Exception { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElementSerialized<String, String> before = null; // DO WORK ICacheElement<String, String> result = SerializationConversionUtil.getDeSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }
/** * Verify null for null. * <p> * @throws IOException */ public void testgGetSerializedCacheElement_null() throws IOException { // SETUP IElementSerializer elementSerializer = new StandardSerializer(); ICacheElement<String, String> before = null; // DO WORK ICacheElementSerialized<String, String> result = SerializationConversionUtil.getSerializedCacheElement( before, elementSerializer ); // VERIFY assertNull( "Should get null for null", result ); }