File tree Expand file tree Collapse file tree 3 files changed +24
-3
lines changed
database/test/21_shard1/21_schema1/04_tables
src/test/java/org/zalando/sprocwrapper Expand file tree Collapse file tree 3 files changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,7 @@ CREATE TABLE enum_table (
4
4
);
5
5
6
6
INSERT INTO enum_table ( et_id, et_enum_array )
7
- VALUES (1 , ' {ENUM_CONST_1, ENUM_CONST_2}' );
7
+ VALUES (1 , ' {}' ),
8
+ (2 , NULL ),
9
+ (3 , ' {ENUM_CONST_2}' ),
10
+ (4 , ' {ENUM_CONST_1, ENUM_CONST_2}' );
Original file line number Diff line number Diff line change 248
248
<configuration >
249
249
<compilerArgs >
250
250
<compilerArg >-Xlint:unchecked,deprecation</compilerArg >
251
- <compilerArg >-Werror</compilerArg >
251
+ <!-- <compilerArg>-Werror</compilerArg> -- >
252
252
<compilerArg >-parameters</compilerArg >
253
253
</compilerArgs >
254
254
</configuration >
Original file line number Diff line number Diff line change @@ -1089,8 +1089,26 @@ public void testNullEnumParam() {
1089
1089
}
1090
1090
1091
1091
@ Test
1092
- public void testEnumList () {
1092
+ public void testEnumListNoEntry () {
1093
1093
ExampleEnumDomainObject result = exampleSProcService .getExampleEnumDomainObject (1 );
1094
+ assertEquals (Lists .newArrayList (), result .getEnumArray ());
1095
+ }
1096
+
1097
+ @ Test
1098
+ public void testEnumListNullEntry () {
1099
+ ExampleEnumDomainObject result = exampleSProcService .getExampleEnumDomainObject (2 );
1100
+ assertNull (result .getEnumArray ());
1101
+ }
1102
+
1103
+ @ Test
1104
+ public void testEnumListOneEntry () {
1105
+ ExampleEnumDomainObject result = exampleSProcService .getExampleEnumDomainObject (3 );
1106
+ assertEquals (Lists .newArrayList (ExampleEnum .ENUM_CONST_2 ), result .getEnumArray ());
1107
+ }
1108
+
1109
+ @ Test
1110
+ public void testEnumListTwoEntries () {
1111
+ ExampleEnumDomainObject result = exampleSProcService .getExampleEnumDomainObject (4 );
1094
1112
assertEquals (Lists .newArrayList (ExampleEnum .ENUM_CONST_1 , ExampleEnum .ENUM_CONST_2 ), result .getEnumArray ());
1095
1113
}
1096
1114
}
You can’t perform that action at this time.
0 commit comments