01: /*
02: *
03: * Copyright (c) 2003 Adrian Price. All rights reserved.
04: */
05:
06: package org.obe.test.standalone;
07:
08: import java.beans.PropertyDescriptor;
09: import org.obe.spi.model.AttributedEntity;
10: import org.obe.spi.model.ProcessInstance;
11: import org.obe.util.ClassUtils;
12:
13: /**
14: *
15: *
16: * @author Adrian Price
17: */
18: public class IntrospectionTest extends junit.framework.TestCase {
19: public IntrospectionTest(String name) {
20: super (name);
21: }
22:
23: public void testIntrospect() {
24: // PropertyDescriptor[] listProps = WorkflowEngineUtilities.introspect(
25: // List.class, Collection.class);
26: PropertyDescriptor[] procInstProps = ClassUtils.introspect(
27: ProcessInstance.class, AttributedEntity.class);
28: String[] procInstAttrs = ClassUtils
29: .getPropertyNames(procInstProps);
30: // assertEquals("Wrong process instance attribute count;", ,
31: // procInstAttrs.length);
32: PropertyDescriptor[] actInstProps = ClassUtils.introspect(
33: ProcessInstance.class, AttributedEntity.class);
34: String[] actInstAttrs = ClassUtils
35: .getPropertyNames(actInstProps);
36: // assertEquals("Wrong activity instance attribute count;", ,
37: // procInstAttrs.length);
38: PropertyDescriptor[] workItemProps = ClassUtils.introspect(
39: ProcessInstance.class, AttributedEntity.class);
40: String[] workItemAttrs = ClassUtils
41: .getPropertyNames(workItemProps);
42: // assertEquals("Wrong work item attribute count;", ,
43: // procInstAttrs.length);
44: }
45: }
|