| Line | |
|---|
| 1 | import grails.test.* |
|---|
| 2 | import org.apache.commons.collections.list.LazyList |
|---|
| 3 | |
|---|
| 4 | class TaskProcedureTests extends GrailsUnitTestCase { |
|---|
| 5 | protected void setUp() { |
|---|
| 6 | super.setUp() |
|---|
| 7 | } |
|---|
| 8 | |
|---|
| 9 | protected void tearDown() { |
|---|
| 10 | super.tearDown() |
|---|
| 11 | } |
|---|
| 12 | |
|---|
| 13 | void testLazyLists() { |
|---|
| 14 | |
|---|
| 15 | def tp = new TaskProcedure() |
|---|
| 16 | assert tp.maintenanceActions instanceof ArrayList |
|---|
| 17 | assert tp.maintenanceActionLazyList instanceof LazyList |
|---|
| 18 | // MaintenanceActions is still an ArrayList after decoration. |
|---|
| 19 | // This may be a requirement of other parts of Grails, for example sortableColumn |
|---|
| 20 | // seems to have issues if it's not. |
|---|
| 21 | assert tp.maintenanceActions instanceof ArrayList |
|---|
| 22 | assert ! (tp.maintenanceActions instanceof LazyList) |
|---|
| 23 | |
|---|
| 24 | } |
|---|
| 25 | } |
|---|
Note: See
TracBrowser
for help on using the repository browser.