The general strategy for unit testing the
ManipulatorRuntime
involves:
Constructing a
ManipulatorRuntime
with a mockPipelineComponentRuntimeContext
that contains a mockOutputChannel
a mockErrorChannel
, and a mockPipelineComponentContext
.Invoking
ManipulatorRuntime.checkFullAcquisitionRequired()
and verifying that the manipulator correctly identifies whether a full acquisition is required.Invoking
ManipulatorRuntime.prepareForAcquisition()
and verifying that the manipulator performs any required preparation before the acquisition starts.Constructing test records, passing the test records to
ManipulatorRuntime.processRecord()
and verifying that the correct records are output to the mockOutputChannel
.Invoking
ErrorChannel.discard()
as necessary to discard any records that are invalid or have errors, and verifying that the invalid records are discarded to the mockErrorChannel
.Invoking
ManipulatorRuntime.onInputClose()
and verifying that the manipulator performs any required clean up after the acquisition completes its record processing.