Rice Pastry API

rice.pastry.testing
Class LeafSetTest

java.lang.Object
  extended byrice.pastry.testing.LeafSetTest

public class LeafSetTest
extends java.lang.Object

This class tests the correctness of the leafset in Pastry.

Version:
$Id: LeafSetTest.java 2759 2005-09-12 13:52:52Z jeffh $
Author:
Alan Mislove

Nested Class Summary
static class LeafSetTest.TestNodeHandle
          DESCRIBE THE CLASS
 
Field Summary
protected  NodeIdFactory factory
          DESCRIBE THE FIELD
protected  RandomSource random
          DESCRIBE THE FIELD
 
Constructor Summary
LeafSetTest()
          Constructor for LeafSetTest.
 
Method Summary
protected  int abs(int x)
          DESCRIBE THE METHOD
protected  void assertTrue(java.lang.String intention, boolean test)
          Throws an exception if the test condition is not met.
protected  LeafSet generateLeafSet(int size, int nodes, boolean crossover)
          Returns a leafset of size size out of a network with the specified number of nodes
static void main(java.lang.String[] args)
          DESCRIBE THE METHOD
protected  int min(int x, int y)
          DESCRIBE THE METHOD
 void start()
          DESCRIBE THE METHOD
 void testCumulativeRange()
          A unit test for JUnit
 void testNonCumulativeRange()
          A unit test for JUnit
 void testObservers()
          A unit test for JUnit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected NodeIdFactory factory
DESCRIBE THE FIELD


random

protected RandomSource random
DESCRIBE THE FIELD

Constructor Detail

LeafSetTest

public LeafSetTest()
Constructor for LeafSetTest.

Method Detail

start

public void start()
DESCRIBE THE METHOD


testObservers

public void testObservers()
A unit test for JUnit


assertTrue

protected final void assertTrue(java.lang.String intention,
                                boolean test)
Throws an exception if the test condition is not met.

Parameters:
intention - DESCRIBE THE PARAMETER
test - DESCRIBE THE PARAMETER

min

protected int min(int x,
                  int y)
DESCRIBE THE METHOD

Parameters:
x - DESCRIBE THE PARAMETER
y - DESCRIBE THE PARAMETER
Returns:
DESCRIBE THE RETURN VALUE

abs

protected int abs(int x)
DESCRIBE THE METHOD

Parameters:
x - DESCRIBE THE PARAMETER
Returns:
DESCRIBE THE RETURN VALUE

testCumulativeRange

public void testCumulativeRange()
A unit test for JUnit


testNonCumulativeRange

public void testNonCumulativeRange()
A unit test for JUnit


generateLeafSet

protected LeafSet generateLeafSet(int size,
                                  int nodes,
                                  boolean crossover)
Returns a leafset of size size out of a network with the specified number of nodes

Parameters:
size - The size of the leaf set
nodes - The number of nodes in the network
crossover - Whether the leafset must cross over the '0' boundary not
Returns:
DESCRIBE THE RETURN VALUE

main

public static void main(java.lang.String[] args)
DESCRIBE THE METHOD

Parameters:
args - DESCRIBE THE PARAMETER

Rice Pastry API

Copyright © 2001-2005 - Rice Pastry.


Imprint-Dataprotection