KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jbpm > taskmgmt > def > SwimlaneTest


1 package org.jbpm.taskmgmt.def;
2
3 import junit.framework.*;
4
5 public class SwimlaneTest extends TestCase {
6
7   private Swimlane buyer = new Swimlane("buyer");
8   private Task laundry = new Task("laundry");
9   private Task dishes = new Task("dishes");
10   
11   public void testSwimlaneAddTask() {
12     buyer.addTask(laundry);
13     buyer.addTask(dishes);
14     assertEquals(2,buyer.getTasks().size());
15     assertTrue(buyer.getTasks().contains(laundry));
16     assertTrue(buyer.getTasks().contains(dishes));
17   }
18
19   public void testSwimlaneAddTaskInverseReference() {
20     buyer.addTask(laundry);
21     buyer.addTask(dishes);
22     assertSame(buyer, laundry.getSwimlane());
23     assertSame(buyer, dishes.getSwimlane());
24   }
25 }
26
Popular Tags