Designer 10.5 | webMethods Unit Test Framework Help | Service Usage | WmServiceMock Services
 
WmServiceMock Services
The services in the WmServiceMock package deal with the mocking aspects of testing. These services provide a way to enable or disable mocks for individual services or server-wide.
wm.ps.serviceMock:loadMock
Sets up mocking for a service.
Inputs
scope
session, user, or server. The default is session.
service
The name of the service to be mocked. No validation is performed on the name of the server or its existence.
mockObject
The mockObject is an object type. The behavior of the mock is controlled by the type of the actual object.
Inputs
java.lang.String
The name of the alternate service to mock the mocked service with.
java.lang.Exception
The exception to be thrown for the mocked service.
com.wm.data.IData
The fixed pipeline to return for the mocked service
com.wm.ps.serviceMock.MockDataFactory
The implementation of the factory objects that creates the dynamic pipeline for the mocked service.
parms
Optional document containing all extra parameters for the alternate service. This parameter is only needed when mocking a service with an alternate service and the alternate service needs additional inputs.
Outputs
None
wm.ps.serviceMock:clearMock
Removes mocking for a service.
Inputs
scope
session, user or server. The default is session.
service
The name of the service to be mocked. No validation is performed on the name of the server or its existence.
Outputs
None
wm.ps.serviceMock:clearAllMocks
Removes mocking for all services.
Inputs
None
Outputs
None
wm.ps.serviceMock:suspendMocks
Suspends mocking for all services.
Inputs
None
Outputs
None
wm.ps.serviceMock:resumeMocks
Resumes mocking for all services, for which it was suspended.
Inputs
None
Outputs
None
wm.ps.serviceMock:getMockedServices
Retrieves the list of services that are currently mocked in all the scopes.
Inputs
None
Outputs
mockedServices
The list of services that are currently mocked in the session, user, or server scope.