psdi.app.person.unittest

Class PersonUnitTestLibrary

  • java.lang.Object
    • psdi.app.person.unittest.PersonUnitTestLibrary


  • public class PersonUnitTestLibrary
    extends java.lang.Object
    Automated tests for Person Commodity.
    • Constructor Detail

      • PersonUnitTestLibrary

        public PersonUnitTestLibrary()
    • Method Detail

      • createPerson

        public static Person createPerson()
      • createPerson

        public static Person createPerson(java.lang.String personName)
        Creates a person with a generated person name with no other information.
        Parameters:
        personName -
        Returns:
      • changeStatus

        public static Person changeStatus(Person person,
                                          java.lang.String status)
                                   throws java.rmi.RemoteException,
                                          MXException
        Throws:
        java.rmi.RemoteException
        MXException
      • createSupervisorChain

        public static Person createSupervisorChain(Person person,
                                                   int height,
                                                   int width)
                                            throws java.rmi.RemoteException,
                                                   MXException
        Creates a supervisor tree. This creates a K-ary (https://en.wikipedia.org/wiki/K-ary_tree)
        Parameters:
        person - The person who will be the head supervisor of the tree
        height - 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.
        Returns:
        The head supervisor after the tree has been committed to the database.
        Throws:
        MXException
        java.rmi.RemoteException
      • logOfBase

        public static double logOfBase(int base,
                                       int num)