Class ClientSoapMockStub

    • Field Detail

      • INTEGER_WILDCARD

        public static final Integer INTEGER_WILDCARD
        Wildcard used for integer comparisons
      • LONG_WILDCARD

        public static final Long LONG_WILDCARD
        Wildcard used for long comparisons
      • DATE_WILDCARD

        public static final Date DATE_WILDCARD
        Wildcard used for Date comparisons
      • GUIDKEY_WILDCARD

        public static final com.vasoftware.sf.server.types.GuidKey GUIDKEY_WILDCARD
        Wildcard used for Guid key comparisons
    • Constructor Detail

      • ClientSoapMockStub

        public ClientSoapMockStub​(String soapServerUrl)
        Constructor for the mock stub class.
        Parameters:
        soapServerUrl - SOAP server URL.
    • Method Detail

      • getCallCount

        protected int getCallCount​(String methodName)
        How many calls were made to a given method?
        Parameters:
        methodName - the name of the method
        Returns:
        the number of calls
      • getCallParameters

        protected Object[] getCallParameters​(String methodName,
                                             int callNumber)
        Return the parameters that the given method was called with on the given call number
        Parameters:
        methodName - the method name
        callNumber - which time the method was called (1-based)
        Returns:
        the array of call parameters
      • addSimulatedResult

        protected void addSimulatedResult​(String methodName,
                                          Object[] parameters,
                                          boolean result)
        Add an expected boolean result for a method
        Parameters:
        methodName - the method name
        parameters - the call parameters
        result - a boolean value
      • addSimulatedResult

        protected void addSimulatedResult​(String methodName,
                                          Object[] parameters,
                                          long result)
        Add an expected long result for a method
        Parameters:
        methodName - the method name
        parameters - the call parameters
        result - a long value
      • addSimulatedResult

        protected void addSimulatedResult​(String methodName,
                                          Object[] parameters,
                                          Object result)
        Add an expected object result for a method
        Parameters:
        methodName - the method name
        parameters - the call parameters
        result - an object value
      • getUnusedCalls

        public Map getUnusedCalls()
        Get a mapping of method names to the unused calls that were prepared for that method.
        Returns:
        a map of method names to unused calls