You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
Plunger has the FunctionCallStub, BufferCallStub, and AggregatorCallStub classes that can be used to concisely exercise Function, Buffer, and Aggregator operations with test data. These stubs handle the basic life cycle of the operations, also providing a store for any context that they might create.
However, the ValueAssertion operation type does not currently have such a stub (and associated builder class) available. This makes it harder to test ValueAssertion implementations than need be. A ValueAssertionCallStub should be provided to fill this void. It can likely be based on the existing stubs and possible extend AbstractOperationCallStub.
What differentiates this call stub from the others is that value on which we can make an assertion. Existing operations return Tuples, but the ValueAssertion either throws
An example usage might look like:
ValueAssertion assertion = new AssertDateValid();
stubCall = Plunger.newAssertionCallStubBuilder(FIELDS)
.addTuple("2013-01-01")
.addTuple("NOT_A_DATE")
.build()
.complete(mockFlowProcess, assertion);
List<AssertionException> result = stubCall.result();
assertThat(collected.get(0), is(nullValue());
assertThat(collected.get(1).getMessage(), is("argument 'TXN_DATE' value was not a valid date, in tuple: ['NOT_A_DATE']");
The text was updated successfully, but these errors were encountered:
Plunger has the
FunctionCallStub
,BufferCallStub
, andAggregatorCallStub
classes that can be used to concisely exerciseFunction
,Buffer
, andAggregator
operations with test data. These stubs handle the basic life cycle of the operations, also providing a store for any context that they might create.However, the
ValueAssertion
operation type does not currently have such a stub (and associated builder class) available. This makes it harder to testValueAssertion
implementations than need be. AValueAssertionCallStub
should be provided to fill this void. It can likely be based on the existing stubs and possible extendAbstractOperationCallStub
.What differentiates this call stub from the others is that value on which we can make an assertion. Existing operations return
Tuples
, but theValueAssertion
either throwsAn example usage might look like:
The text was updated successfully, but these errors were encountered: