com.ibm.tivoli.maximo.fwm.unittest.util

Class MXUnitTestUtil

  • java.lang.Object
    • com.ibm.tivoli.maximo.fwm.unittest.util.MXUnitTestUtil


  • public final class MXUnitTestUtil
    extends java.lang.Object
    Unit testing helper utility class.
    • Method Detail

      • getInstance

        public static MXUnitTestUtil getInstance()
        Returns:
        an instance of this helper.
      • finalize

        protected void finalize()
                         throws java.lang.Throwable

        Ensure that MXServer is shut down when the helper instance finalizes.

        Overrides:
        finalize in class java.lang.Object
        Throws:
        java.lang.Throwable
      • getNewUserInfo

        public UserInfo getNewUserInfo(java.lang.String loginid)
                                throws MXException
        Returns Maximo user information for user loginid.
        Parameters:
        loginid - person ID of the desired user.
        Returns:
        Maximo user information for user loginid.
        Throws:
        MXException - if any error occurs while getting the information for Maximo user to be used in the tests.
      • stopMXServer

        public void stopMXServer()
                          throws java.net.MalformedURLException,
                                 java.rmi.NotBoundException,
                                 java.rmi.RemoteException
        Shuts down the current server instance. This is only meant to be used for instances started by this utility class, not from inside a deployed Maximo.
        Throws:
        java.rmi.NotBoundException - if the current instance could not be located.
        java.net.MalformedURLException - if the server URL is malformed.
        java.rmi.RemoteException - if a network error occurs.
        See Also:
        psdi.servlet.MAXIMOStartupServlet, psdi.servlet.MAXIMOStartupServlet#destroy()