use of com.redhat.service.bridge.infra.models.filters.ValuesIn in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class FilterEvaluatorFactoryFEELTest method valuesInWithTemplate.
@Test
public void valuesInWithTemplate() {
String expectedMulti = "if data.name = \"jacopo\" or data.name = \"rota\" or data.name = 2 then \"OK\" else \"NOT_OK\"";
String templateMulti = TEMPLATE_FACTORY_FEEL.getTemplateByFilterType(new ValuesIn("data.name", Arrays.asList("jacopo", "rota", 2)));
assertThat(templateMulti).isEqualTo(expectedMulti);
}
use of com.redhat.service.bridge.infra.models.filters.ValuesIn in project sandbox by 5733d9e2be6485d52ffa08870cabdee0.
the class ProcessorAPITest method addProcessorWithWrongFilterFiltersToBridge.
@Test
@TestSecurity(user = TestConstants.DEFAULT_CUSTOMER_ID)
public void addProcessorWithWrongFilterFiltersToBridge() {
BridgeResponse bridgeResponse = createAndDeployBridge();
Response response = TestUtils.addProcessorToBridge(bridgeResponse.getId(), new ProcessorRequest("myProcessor", Collections.singleton(new ValuesIn("pepe", null)), null, createKafkaAction()));
assertThat(response.getStatusCode()).isEqualTo(400);
}
Aggregations