Skip to content

Commit

Permalink
feat: add propertiesAsType method in InboundConnectorContextBuilder c…
Browse files Browse the repository at this point in the history
…lass (#448)
  • Loading branch information
markfarkas-camunda authored and chillleader committed Jul 26, 2023
1 parent e0e2415 commit 092021c
Showing 1 changed file with 12 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,17 @@ public InboundConnectorContextBuilder properties(Object obj) {
return this;
}

/**
* Provides propertiesAsType as object
*
* @param obj - propertiesAsType as object
* @return builder for fluent API
*/
public InboundConnectorContextBuilder propertiesAsType(Object obj) {
this.propertiesAsType = obj;
return this;
}

/**
* Assigns correlation result that will be returned on {@link InboundConnectorContext#correlate}
* call
Expand All @@ -144,13 +155,8 @@ public TestInboundConnectorContext build() {
}

private void assertNoProperties() {

if (propertiesAsType != null) {
throw new IllegalStateException("propertiesAsType already set");
}

if (properties != null) {
throw new IllegalStateException("propertiesAsType already set");
throw new IllegalStateException("properties already set");
}
}

Expand Down

0 comments on commit 092021c

Please sign in to comment.