1 16 17 package org.apache.commons.codec; 18 19 import junit.framework.TestCase; 20 21 25 public abstract class BinaryEncoderAbstractTest extends TestCase { 26 27 public BinaryEncoderAbstractTest(String name) { 28 super(name); 29 } 30 31 protected abstract BinaryEncoder makeEncoder(); 32 33 35 public void testEncodeEmpty() throws Exception { 36 BinaryEncoder encoder = makeEncoder(); 37 encoder.encode(new byte[0]); 38 } 39 40 public void testEncodeNull() throws Exception { 41 BinaryEncoder encoder = makeEncoder(); 42 try { 43 encoder.encode(null); 44 } catch( EncoderException ee ) { 45 } 47 } 48 } 49 | Popular Tags |