Package org.jasig.cas.util

Examples of org.jasig.cas.util.DefaultLongNumericGenerator


* @since 3.0
*/
public class DefaultLongNumericGeneratorTests extends TestCase {

    public void testWrap() {
        assertEquals(Long.MAX_VALUE, new DefaultLongNumericGenerator(Long.MAX_VALUE)
            .getNextLong());
    }
View Full Code Here


        assertEquals(Long.MAX_VALUE, new DefaultLongNumericGenerator(Long.MAX_VALUE)
            .getNextLong());
    }

    public void testInitialValue() {
        assertEquals(10L, new DefaultLongNumericGenerator(10L)
            .getNextLong());
    }
View Full Code Here

        assertEquals(10L, new DefaultLongNumericGenerator(10L)
            .getNextLong());
    }

    public void testIncrementWithNoWrap() {
        assertEquals(0, new DefaultLongNumericGenerator().getNextLong());
    }
View Full Code Here

    public void testIncrementWithNoWrap() {
        assertEquals(0, new DefaultLongNumericGenerator().getNextLong());
    }
   
    public void testIncrementWithNoWrap2() {
        final DefaultLongNumericGenerator g = new DefaultLongNumericGenerator();
        g.getNextLong();
        assertEquals(1, g.getNextLong());
    }
View Full Code Here

        g.getNextLong();
        assertEquals(1, g.getNextLong());
    }

    public void testMinimumSize() {
        assertEquals(1, new DefaultLongNumericGenerator().minLength());
    }
View Full Code Here

        assertEquals(1, new DefaultLongNumericGenerator().minLength());
    }

    public void testMaximumLength() {
        assertEquals(Long.toString(Long.MAX_VALUE).length(),
            new DefaultLongNumericGenerator().maxLength());
    }
View Full Code Here

TOP

Related Classes of org.jasig.cas.util.DefaultLongNumericGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.