source: branches/features/taskProcedureRework/test/unit/TaskProcedureTests.groovy @ 771

Last change on this file since 771 was 771, checked in by gav, 9 years ago

Add TaskProcedureTests to test use of LazyList?.

File size: 770 bytes
Line 
1import grails.test.*
2import org.apache.commons.collections.list.LazyList
3
4class 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.