From ec9976056535b14b5d6b125f90505fcd97f34183 Mon Sep 17 00:00:00 2001 From: Emanuele Saccomandi <48432054+emajo@users.noreply.github.com> Date: Mon, 27 May 2024 15:28:31 +0200 Subject: [PATCH] improvement: added not like/contains filters --- src/main/java/it/fattureincloud/sdk/filter/Operator.java | 2 ++ .../java/it/fattureincloud/sdk/filter/OperatorTest.java | 6 ++++++ 2 files changed, 8 insertions(+) diff --git a/src/main/java/it/fattureincloud/sdk/filter/Operator.java b/src/main/java/it/fattureincloud/sdk/filter/Operator.java index e0fa0a1e..37b21f6f 100644 --- a/src/main/java/it/fattureincloud/sdk/filter/Operator.java +++ b/src/main/java/it/fattureincloud/sdk/filter/Operator.java @@ -11,6 +11,8 @@ public enum Operator { IS_NOT("is not"), LIKE("like"), CONTAINS("contains"), + NOT_LIKE("not like"), + NOT_CONTAINS("not contains"), STARTS_WITH("starts with"), ENDS_WITH("ends with"); diff --git a/src/test/java/it/fattureincloud/sdk/filter/OperatorTest.java b/src/test/java/it/fattureincloud/sdk/filter/OperatorTest.java index ff3206c0..6fd2765e 100644 --- a/src/test/java/it/fattureincloud/sdk/filter/OperatorTest.java +++ b/src/test/java/it/fattureincloud/sdk/filter/OperatorTest.java @@ -43,6 +43,12 @@ public void testOperator() { Operator contains = Operator.CONTAINS; assertEquals("contains", contains.getSymbol()); + Operator notLike = Operator.NOT_LIKE; + assertEquals("not like", notLike.getSymbol()); + + Operator notContains = Operator.NOT_CONTAINS; + assertEquals("not contains", notContains.getSymbol()); + Operator startsWith = Operator.STARTS_WITH; assertEquals("starts with", startsWith.getSymbol());