1 16 17 package org.apache.axis2.addressing; 18 19 import junit.framework.TestCase; 20 21 import javax.xml.namespace.QName ; 22 23 24 public class AnyContentTypeTest extends TestCase { 25 private AnyContentType anyContentType; 26 27 public static void main(String [] args) { 28 junit.textui.TestRunner.run(AnyContentTypeTest.class); 29 } 30 31 34 protected void setUp() throws Exception { 35 super.setUp(); 36 anyContentType = new AnyContentType(); 37 } 38 39 public void testAddAndGetReferenceValue() { 40 System.out.println("Testing by putting more than 5 values in this. (this is initialized for 5)"); 41 for (int i = 0; i < 10; i++) { 42 anyContentType.addReferenceValue(new QName ("http://www.opensouce.lk/" + i, "" + i), "value " + i * 100); 43 } 44 45 for (int i = 0; i < 10; i++) { 46 String value = anyContentType.getReferenceValue(new QName ("http://www.opensouce.lk/" + i, "" + i)); 47 assertEquals("Input value differs from what is taken out from AnyContentType", value, "value " + i * 100); 48 } 49 50 } 51 52 53 } 54 | Popular Tags |