1 23 24 package org.objectweb.jorm.mapper.rdb.lib; 25 26 import junit.framework.Test; 27 import junit.framework.TestSuite; 28 import junit.textui.TestRunner; 29 30 import java.io.Serializable ; 31 32 37 public class TestRdbBlobBigObject extends TestRdbBlob implements BlobVerifier { 38 39 private String object = null; 40 41 public TestRdbBlobBigObject() { 42 super("Test of RdbBlob class with a big Object"); 43 System.out.println("Please wait the test takes few minutes..."); 44 } 45 46 public TestRdbBlobBigObject(String tn) { 47 super(tn); 48 System.out.println("Please wait the test takes few minutes..."); 49 } 50 51 public void setUp() { 52 try { 53 object = "01"; 54 for (int i = 0; i < 20; i++) 55 object += object; 56 verifier = this; 58 blob = new RdbBlob(verifier.getObject()); 59 assertNotNull("Blob is null", blob); 60 } 61 catch (Exception e) { 62 e.printStackTrace(); 63 fail(e.getMessage()); 64 } 65 } 66 67 protected void tearDown() { 68 blob = null; 70 verifier = null; 71 } 72 73 public static void main(String args[]) { 74 TestRunner.run(suite()); 75 } 76 77 public static Test suite() { 78 return new TestSuite(TestRdbBlobBigObject.class); 79 } 80 81 82 84 public boolean valid(byte aByte, long pos) { 85 return true; 86 } 87 88 public boolean isSize(long size) { 89 return true; 90 } 91 92 public boolean isEquals(Object o) { 93 return object.equals(o); 94 } 95 96 public Serializable getObject() { 97 return object; 98 } 99 } 100 101 | Popular Tags |