Package org.tinyuml.model

Examples of org.tinyuml.model.IdGenerator


  /**
   * Tests the generator methods.
   */
  public void testIdGenerator() {
    IdGenerator generator = new IdGenerator();
    int id1 = generator.nextId();
    assertTrue(id1 > 0);
    int id2 = generator.nextId();
    assertTrue(id2 > id1);
  }
View Full Code Here


 
  /**
   * Tests the generator methods after initialization.
   */
  public void testIdGeneratorAfterInitialize() {
    IdGenerator generator = new IdGenerator();
    generator.initialize(6);
    int id1 = generator.nextId();
    assertTrue(id1 >= 6);
    int id2 = generator.nextId();
    assertTrue(id2 > id1);   
  }
View Full Code Here

TOP

Related Classes of org.tinyuml.model.IdGenerator

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.