1 package org.jbpm.instantiation; 2 3 import org.jbpm.instantiation.ConstructorInstantiator; 4 5 import junit.framework.*; 6 7 public class ConstructorInstantiatorTest extends TestCase { 8 9 public ConstructorInstantiator constructorInstantiator = new ConstructorInstantiator(); 10 11 public static class StringConstructorClass { 12 String input = null; 13 public StringConstructorClass( String input ) { 14 this.input = input; 15 } 16 } 17 18 public void testConstructorInstantiator() { 19 String configuration = "hello"; 20 StringConstructorClass o = (StringConstructorClass) constructorInstantiator.instantiate(StringConstructorClass.class, configuration); 21 assertEquals("hello", o.input ); 22 } 23 } 24 | Popular Tags |