Skip to content

Commit

Permalink
Handle new GenerationType.UUID in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
beikov committed Feb 23, 2022
1 parent 12eac58 commit c6f4f43
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/com/sun/ts/tests/jpa/core/enums/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -1162,6 +1162,12 @@ public void generationTypeValueOfTest() throws Fault {
+ ft.name());
pass = false;
}
ft = GenerationType.valueOf(GenerationType.UUID.name());
if (!ft.equals(GenerationType.UUID)) {
TestUtil.logErr("expected:" + GenerationType.UUID.name() + ", actual:"
+ ft.name());
pass = false;
}
try {
GenerationType.valueOf("DOESNOTEXIST");
TestUtil.logErr("IllegalArgumentException was not thrown");
Expand Down Expand Up @@ -1200,9 +1206,9 @@ public void generationTypeValuesTest() throws Fault {
try {

Collection<GenerationType> gt = Arrays.asList(GenerationType.values());
if (gt.size() != 4) {
if (gt.size() != 5) {
TestUtil
.logErr("Number of GenerationType expected:4, actual:" + gt.size());
.logErr("Number of GenerationType expected:5, actual:" + gt.size());
pass = false;
}

Expand Down Expand Up @@ -1230,6 +1236,12 @@ public void generationTypeValuesTest() throws Fault {
TestUtil.logErr("Expected value:" + GenerationType.TABLE);
pass = false;
}
if (gt.contains(GenerationType.UUID)) {
TestUtil.logTrace("received:" + GenerationType.UUID);
} else {
TestUtil.logErr("Expected value:" + GenerationType.UUID);
pass = false;
}

for (GenerationType g : gt) {
try {
Expand Down

0 comments on commit c6f4f43

Please sign in to comment.