Examples of RandomConnectionFilter


Examples of cleo.search.connection.RandomConnectionFilter

 
  public void testRandomConnectionFilter() {
    int source = rand.nextInt(100000);
    int target = rand.nextInt(100000);
    Connection conn = new SimpleConnection(source, target, true);
    ConnectionFilter connFilter = new RandomConnectionFilter();
   
    boolean rejected = false;
    boolean accepted = false;
   
    while(!rejected) {
      rejected = !connFilter.accept(conn);
    }
   
    while(!accepted) {
      accepted = connFilter.accept(conn);
    }
   
    assertEquals(true, rejected);
    assertEquals(true, accepted);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.