1 22 package test.performance.serialize; 23 24 import javax.management.ObjectName ; 25 26 import junit.framework.Test; 27 import junit.framework.TestSuite; 28 29 34 public class ObjectNameTestSuite 35 extends TestSuite 36 { 37 39 41 public static void main(String [] args) 42 { 43 junit.textui.TestRunner.run(suite()); 44 } 45 46 49 public static Test suite() 50 { 51 TestSuite suite = new TestSuite("All Object Name tests"); 52 53 try 54 { 55 ObjectName name1 = new ObjectName ("a:a=a"); 56 ObjectName name10 = new ObjectName ("a:a=a,b=b,c=c,d=d,e=e,f=f,g=g,h=h,i=i,j=j"); 57 StringBuffer buffer = new StringBuffer ("a:0=0"); 58 for (int i=1; i < 100; i++) 59 buffer.append("," + i + "=" + i); 60 ObjectName name100 = new ObjectName (buffer.toString()); 61 suite.addTest(new SerializeTEST("testIt", name1, "ObjectName 1 property")); 63 suite.addTest(new SerializeTEST("testIt", name10, "ObjectName 10 properties")); 64 suite.addTest(new SerializeTEST("testIt", name100, "ObjectName 100 properties")); 65 } 66 catch (Exception e) 67 { 68 throw new Error (e.toString()); 69 } 70 71 return suite; 72 } 73 } 74 | Popular Tags |