1 16 package org.apache.commons.jxpath.ri.model.beans; 17 18 import junit.framework.TestSuite; 19 20 import org.apache.commons.jxpath.AbstractFactory; 21 import org.apache.commons.jxpath.JXPathContext; 22 import org.apache.commons.jxpath.TestBean; 23 import org.apache.commons.jxpath.ri.model.BeanModelTestCase; 24 25 31 32 public class BeanModelTest extends BeanModelTestCase { 33 38 public BeanModelTest(String name) { 39 super(name); 40 } 41 42 45 public static TestSuite suite() { 46 return (new TestSuite(BeanModelTest.class)); 47 } 48 49 protected Object createContextBean() { 50 return new TestBean(); 51 } 52 53 protected AbstractFactory getAbstractFactory() { 54 return new TestBeanFactory(); 55 } 56 57 public void testIndexedProperty() { 58 JXPathContext context = 59 JXPathContext.newContext(null, new TestIndexedPropertyBean()); 60 61 assertXPathValueAndPointer( 62 context, 63 "indexed[1]", 64 new Integer (0), 65 "/indexed[1]"); 66 } 67 68 69 } | Popular Tags |