01: package org.drools.brms.modeldriven;
02:
03: import junit.framework.TestCase;
04:
05: import org.drools.brms.client.modeldriven.brl.CompositeFactPattern;
06: import org.drools.brms.client.modeldriven.brl.FactPattern;
07:
08: public class CompositeFactPatternTest extends TestCase {
09:
10: public void testAddPattern() {
11: final CompositeFactPattern pat = new CompositeFactPattern();
12: final FactPattern x = new FactPattern();
13: pat.addFactPattern(x);
14: assertEquals(1, pat.patterns.length);
15:
16: final FactPattern y = new FactPattern();
17: pat.addFactPattern(y);
18: assertEquals(2, pat.patterns.length);
19: assertEquals(x, pat.patterns[0]);
20: assertEquals(y, pat.patterns[1]);
21: }
22:
23: }
|