Package mondrian.util

Class ConcatenableListTest


  • public class ConcatenableListTest
    extends TestCase
    Test cases for ConcatenableList.

    Currently oriented at testing fixes for a couple of known bugs; these should not be considered to be otherwise comprehensive.

    • Constructor Detail

      • ConcatenableListTest

        public ConcatenableListTest()
    • Method Detail

      • testBasicIteration

        public void testBasicIteration()
        Tests that basic iteration over multiple backing lists works properly, whether or not there are intervening empty lists.
      • testIteratorNextWithoutHasNext

        public void testIteratorNextWithoutHasNext()
        Tests that it is possible to iterate through a series of next() calls without first calling hasNext(). (Necessary because an earlier implementation of ConcatenableList would throw a null pointer exception if hasNext() wasn't called first.)
      • testGetZeroWithMultipleEmptyLists

        public void testGetZeroWithMultipleEmptyLists()
        Tests that if multiple empty lists are added, followed by a non-empty list, iteration behaves correctly and get(0) does not fail. (An earlier implementation of ConcatenableList would incorrectly throw an IndexOutOfBoundsException when get(0) was called on an instance where the backing lists included two consecutive empty lists.)