...
Code Block |
---|
dmiDispatcher1.moduleNamesPerCmHandleId['ch-1'] = ['M1'] |
...
Interacting with other web services (mock webservers & dispatchers)
NCMP frequently interacts with the DMI Plugin to perform operations on the data/models. To mimic this behavior the integration tests are using a feature of MockWebServer to mock interactions with the DMI.
It has two main parts: a dedicated mock server and a dispatcher which has hardcoded endpoints (each with a specific response to it).
The configuration of the mock server is fairly straghtforward: we just have to create an instace of it and pass the feature-specific dispatcher to it.
And also the URL for the DMI must be created with the server and port values of the mock server.
...