forked from jhc-systems/debezium-connector-ibmi
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DBZ-8453 remove duplicate enum preventing processing of deletes
- Loading branch information
Showing
3 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
...nal-parsing/src/test/java/io/debezium/ibmi/db2/journal/retrieve/JournalEntryTypeTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* Copyright Debezium Authors. | ||
* | ||
* Licensed under the Apache Software License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package io.debezium.ibmi.db2.journal.retrieve; | ||
|
||
import static org.junit.jupiter.api.Assertions.assertFalse; | ||
|
||
import java.util.HashMap; | ||
import java.util.Map; | ||
|
||
import org.junit.jupiter.api.Test; | ||
|
||
class JournalEntryTypeTest { | ||
|
||
@Test | ||
public void checkNoDuplicateEnums() { | ||
Map<String, JournalEntryType> found = new HashMap<>(); | ||
for (final JournalEntryType e : JournalEntryType.values()) { | ||
assertFalse(found.containsKey(e.code), "map must not contain duplicate values found enums " + e + ", " + found.get(e.code)); | ||
found.put(e.code, e); | ||
} | ||
} | ||
|
||
} |