FileDocCategorySizeDatePackage
CounterTest.javaAPI DocExample1601Mon Jul 23 13:26:26 BST 2007org.apache.struts2.util

CounterTest

public class CounterTest extends TestCase

Fields Summary
Counter
c
Constructors Summary
Methods Summary
public voidtestCurrentAfterNext()



       
        long next = c.getNext();
        long current = c.getCurrent();
        assertEquals(next + 1, current);
    
public voidtestCurrentBeforeNext()

        long current = c.getCurrent();
        long next = c.getNext();
        assertEquals(current, next);
    
public voidtestWrap()

        c.setWrap(true);
        c.setLast(1);

        long a = c.getNext();
        long b = c.getNext();
        assertEquals(1, a);
        assertEquals(1, b);