Package li.earth.urchin.twic.persistence.id

Examples of li.earth.urchin.twic.persistence.id.IDGenerator


public abstract class IDGeneratorTests {
 
  @Test
  public void startsSomewhereOtherThanZero() throws Exception {
    IDGenerator generator = newIDGenerator();
    int id = generator.generateID(String.class);
    assertTrue(id != 0);
  }
View Full Code Here


    assertTrue(id != 0);
  }
 
  @Test
  public void doesNotMakeTheSameIDTwice() throws Exception {
    IDGenerator generator = newIDGenerator();
    int id1 = generator.generateID(String.class);
    int id2 = generator.generateID(String.class);
    int id3 = generator.generateID(String.class);
    assertTrue(id1 != id2);
    assertTrue(id2 != id3);
  }
View Full Code Here

TOP

Related Classes of li.earth.urchin.twic.persistence.id.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.