KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > instantiation > ConstructorInstantiatorTest


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 JavaDoc input = null;
13     public StringConstructorClass( String JavaDoc input ) {
14       this.input = input;
15     }
16   }
17
18   public void testConstructorInstantiator() {
19     String JavaDoc configuration = "hello";
20     StringConstructorClass o = (StringConstructorClass) constructorInstantiator.instantiate(StringConstructorClass.class, configuration);
21     assertEquals("hello", o.input );
22   }
23 }
24
Popular Tags