psdi.app.workorder.unittest

Class WOLibrary

  • java.lang.Object
    • psdi.app.workorder.unittest.WOLibrary


  • public class WOLibrary
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor and Description
      WOLibrary() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static void changeStatusToAppr(WO wo)
      Takes a workorder and attempts to change the status to approve.
      static void changeStatusToAppr(WO wo, java.lang.String endStatus)
      Takes a workorder and attempts to change the status to approve
      static void changeStatusToWappr(WO wo)
      Takes a workorder and attempts to change the status to waiting approval.
      static void changeStatusToWappr(WO wo, java.lang.String endStatus)
      Takes a workorder and attempts to change the status to waiting approval
      static WO createWO()
      Use this method to create a WO that will only be used in one unit test.
      static WO createWO(java.lang.String name)
      Use this method to create a workorder that will spawn over multiple unittest.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WOLibrary

        public WOLibrary()
    • Method Detail

      • createWO

        public static WO createWO()
        Use this method to create a WO that will only be used in one unit test.
        Returns:
      • createWO

        public static WO createWO(java.lang.String name)
        Use this method to create a workorder that will spawn over multiple unittest.
        Parameters:
        name - The name you want to give the mbo
        Returns:
        Either the created WO or a saved WO, if one exists.
      • changeStatusToAppr

        public static void changeStatusToAppr(WO wo)
                                       throws java.rmi.RemoteException,
                                              MXException
        Takes a workorder and attempts to change the status to approve. If you are expecting another status use changeStatusToAppr(WO, String)
        Parameters:
        wo - The WO to approve
        Throws:
        java.rmi.RemoteException
        MXException
      • changeStatusToAppr

        public static void changeStatusToAppr(WO wo,
                                              java.lang.String endStatus)
                                       throws java.rmi.RemoteException,
                                              MXException
        Takes a workorder and attempts to change the status to approve
        Parameters:
        wo - The WO to approve
        endStatus - The expected end status
        Throws:
        java.rmi.RemoteException
        MXException
      • changeStatusToWappr

        public static void changeStatusToWappr(WO wo)
                                        throws java.rmi.RemoteException,
                                               MXException
        Takes a workorder and attempts to change the status to waiting approval. If you are expecting another status use changeStatusToWappr(WO, String)
        Parameters:
        wo - The WO to approve
        Throws:
        java.rmi.RemoteException
        MXException
      • changeStatusToWappr

        public static void changeStatusToWappr(WO wo,
                                               java.lang.String endStatus)
                                        throws java.rmi.RemoteException,
                                               MXException
        Takes a workorder and attempts to change the status to waiting approval
        Parameters:
        wo - The WO to approve
        endStatus - The expected end status, if different
        Throws:
        java.rmi.RemoteException
        MXException