nine03 commented on code in PR #2557:
URL: https://github.com/apache/streampipes/pull/2557#discussion_r1524667874


##########
streampipes-extensions/streampipes-processors-transformation-jvm/src/test/java/org/apache/streampipes/processors/transformation/jvm/processor/booloperator/counter/TestBooleanCounterProcessor.java:
##########
@@ -132,15 +122,22 @@ public void disconnect() throws SpRuntimeException {}
     Integer counter = sendEvents(booleanCounter, spOut);
     LOG.info("Expected match count is {}", expectedBooleanCount);
     LOG.info("Actual match count is {}", counter);
-    assertEquals(expectedBooleanCount, counter);
+    Assertions.assertEquals(expectedBooleanCount, counter);
   }
 
-  private Integer sendEvents(BooleanCounterProcessor booleanCounter, 
SpOutputCollector spOut) {
+  /**
+   * Defines which boolean changes should be counted
+   * 0: BOTH
+   * 1: TRUE -> FALSE
+   * 2: FALSE -> TRUE
+   */
+
+  private Integer sendEvents(BooleanCounterProcessor booleanCounter, 
SpOutputCollector spOut, List<Boolean> eventBooleans, String invertFieldName) {
     int counter = 0;
-    List<Event> events = makeEvents();
+    List<Event> events = makeEvents(eventBooleans, invertFieldName);
     for (Event event : events) {
       LOG.info("Sending event with value "
-          + event.getFieldBySelector("s0::" + 
invertFieldName).getAsPrimitive().getAsBoolean());
+              + event.getFieldBySelector("s0::" + 
invertFieldName).getAsPrimitive().getAsBoolean());
       booleanCounter.onEvent(event, spOut);

Review Comment:
   There's an error in line 141.
   
   ```
   booleanCounter.onEvent(event, spOut);
   ```
   
   There's an error in spOut.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to