Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CU-86b1uerqp: Add enum with all possible MT sequence paths SRU2024 #209

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* (PW-2006) Fixed `getMUR` and `setMUR` in `SwiftMessage` to prioritize field 108 in block 4 over block 3 for system messages (category 0)
* Added new `MtSequenceEnum` with all the available inner sequences of specific MT schemas
* Added `isSystemMessage()` to SwiftMessage to check if the message is a category 0 message (010. 011, etc...)
* Added new `MtSequenceEnum` with all the available inner sequences of specific MT schemas

#### 9.5.2 - October 2024
* Added new `FieldEnum` with all the available field names
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ public enum FieldEnum {
F14N,
F14O,
F14J,
F14P,
F14Q,
F14R,
F14S,
F15A,
F15B,
Expand All @@ -83,8 +86,10 @@ public enum FieldEnum {
F15P,
F16A,
F16C,
F16D,
F16R,
F16S,
F16W,
F17A,
F17B,
F17C,
Expand Down Expand Up @@ -145,7 +150,6 @@ public enum FieldEnum {
F22F,
F22G,
F22H,
F22J,
F22K,
F22L,
F22M,
Expand Down Expand Up @@ -207,7 +211,6 @@ public enum FieldEnum {
F29H,
F29I,
F29J,
F29K,
F29L,
F29M,
F29N,
Expand All @@ -216,11 +219,14 @@ public enum FieldEnum {
F29S,
F29T,
F29U,
F29Q,
F29W,
F30F,
F30G,
F30H,
F30I,
F30J,
F30K,
F30M,
F30N,
F30P,
Expand Down Expand Up @@ -323,9 +329,7 @@ public enum FieldEnum {
F37L,
F37M,
F37N,
F37P,
F37R,
F37U,
F37V,
F38A,
F38D,
Expand All @@ -336,7 +340,6 @@ public enum FieldEnum {
F39A,
F39B,
F39C,
F39D,
F39E,
F39F,
F39M,
Expand All @@ -363,7 +366,6 @@ public enum FieldEnum {
F44D,
F44E,
F44F,
F44H,
F44J,
F45A,
F45B,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@
/**
* Enumeration representing all possible sequence paths for each MT (Message Type) schema.
* Each constant in this enumeration corresponds to a specific MT schema, identified by its
* sequence paths as a comma-separated string (CSV) for SRU 2023.
* sequence paths as a comma-separated string (CSV) for SRU 2024.
*
* <p>For example, the MT508 message type may have sequence paths such as "A", "A/A1", "B", "B/B1", and "C",
* which would be represented as the CSV string "A,A/A1,B,B/B1,C".
* Note that internal loops not clearly identified and named in the standard as a sequence, are excluded.
*
* <p>For example, the MT801 message contains the "Loop1" and "Loop2" sequences, and this are not included in the sequence paths.
*
* @since 9.4.18
* @since 9.5.3
*/
@Generated
public enum MtSequenceEnum {
Expand Down Expand Up @@ -103,9 +103,9 @@ public enum MtSequenceEnum {
MT548("A,A/A1,A/A2,A/A2/A2a,B,B/B1,C,C/C1,C/C1/C1a,C/C1/C1a/C1a1,C/C1/C1a/C1a1/C1a1A,C/C1/C1a/C1a1/C1a1A/C1a1A1,C/C1/C1a/C1a1/C1a1B,C/C1/C1a/C1a1/C1a1B/C1a1B1,C/C1/C1a/C1a1/C1a1B/C1a1B1/C1a1B1a,C/C1/C1a/C1a1/C1a1B/C1a1B1/C1a1B1a/C1a1B1a1,D"),
MT549("A,A/A1,B,C,D"),
MT558("A,A/A1,A/A2,A/A2/A2a,A/A3,B,B/B1,C,D,E"),
MT564("A,A/A1,B,B/B1,B/B2,C,D,E,E/E1,E/E1/E1a,E/E2,F"),
MT564("A,A/A1,A/A2,B,B/B1,B/B2,C,D,E,E/E1,E/E1/E1a,E/E2,F"),
MT565("A,A/A1,B,B/B1,B/B2,C,D,E"),
MT566("A,A/A1,B,B/B1,C,D,D/D1,D/D1/D1a,D/D1/D1b,D/D2,D/D2/D2a,D/D2/D2b,E"),
MT566("A,A/A1,A/A2,B,B/B1,C,D,D/D1,D/D1/D1a,D/D1/D1b,D/D2,D/D2/D2a,D/D2/D2b,E"),
MT567("A,A/A1,A/A2,A/A2/A2a,B,C"),
MT568("A,A/A1,B,B/B1,C"),
MT569("A,A/A1,A/A2,B,C,C/C1,C/C1/C1a,C/C1/C1a/C1a1,C/C1/C1a/C1a1/C1a1A,D"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import org.junit.jupiter.api.Test;

class FieldEnu5mTest {
class FieldEnumTest {

@Test
void testFieldName_F11A() {
Expand All @@ -14,16 +14,16 @@ void testFieldName_F11A() {
}

@Test
void testFieldName_F22J() {
FieldEnum field = FieldEnum.F22J;
String expectedName = "22J";
void testFieldName_F29Q() {
FieldEnum field = FieldEnum.F29Q;
String expectedName = "29Q";
assertEquals(expectedName, field.fieldName());
}

@Test
void testFieldName_F44H() {
FieldEnum field = FieldEnum.F44H;
String expectedName = "44H";
void testFieldName_F30K() {
FieldEnum field = FieldEnum.F30K;
String expectedName = "30K";
assertEquals(expectedName, field.fieldName());
}

Expand All @@ -35,16 +35,16 @@ void testFromFieldNameValid_11A() {
}

@Test
void testFromFieldNameValid_22J() {
String fieldName = "22J";
FieldEnum expectedEnum = FieldEnum.F22J;
void testFromFieldNameValid_29Q() {
String fieldName = "29Q";
FieldEnum expectedEnum = FieldEnum.F29Q;
assertEquals(expectedEnum, FieldEnum.fromFieldName(fieldName));
}

@Test
void testFromFieldNameValid_44H() {
String fieldName = "44H";
FieldEnum expectedEnum = FieldEnum.F44H;
void testFromFieldNameValid_30K() {
String fieldName = "30K";
FieldEnum expectedEnum = FieldEnum.F30K;
assertEquals(expectedEnum, FieldEnum.fromFieldName(fieldName));
}

Expand Down
Loading