public class PersonUnitTestLibrary
extends java.lang.Object
Constructor and Description |
---|
PersonUnitTestLibrary() |
Modifier and Type | Method and Description |
---|---|
static Person |
changeStatus(Person person,
java.lang.String status) |
static Person |
createPerson() |
static Person |
createPerson(java.lang.String personName)
Creates a person with a generated person name with no other information.
|
static Person |
createSupervisorChain(Person person,
int height,
int width)
Creates a supervisor tree.
|
static double |
logOfBase(int base,
int num) |
public static Person createPerson()
public static Person createPerson(java.lang.String personName)
personName
- public static Person changeStatus(Person person, java.lang.String status) throws java.rmi.RemoteException, MXException
java.rmi.RemoteException
MXException
public static Person createSupervisorChain(Person person, int height, int width) throws java.rmi.RemoteException, MXException
person
- The person who will be the head supervisor of the treeheight
- The depth of the tree. 0 or 1 means there will be no children. 2 means parent/child, 3 grandparent/parent/child, etc.width
- The width of the tree. If numOfAncestors is >=1 and this is 0, this variable will be 1. If this is
>1 then each child starting with parent will have this many children.MXException
java.rmi.RemoteException
public static double logOfBase(int base, int num)