File tree Expand file tree Collapse file tree
database/test/21_shard1/21_schema1/04_tables
src/test/java/org/zalando/sprocwrapper Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,4 +4,7 @@ CREATE TABLE enum_table (
44);
55
66INSERT 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 248248 <configuration >
249249 <compilerArgs >
250250 <compilerArg >-Xlint:unchecked,deprecation</compilerArg >
251- <compilerArg >-Werror</compilerArg >
251+ <!-- <compilerArg>-Werror</compilerArg> -- >
252252 <compilerArg >-parameters</compilerArg >
253253 </compilerArgs >
254254 </configuration >
Original file line number Diff line number Diff line change @@ -1089,8 +1089,26 @@ public void testNullEnumParam() {
10891089 }
10901090
10911091 @ Test
1092- public void testEnumList () {
1092+ public void testEnumListNoEntry () {
10931093 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 );
10941112 assertEquals (Lists .newArrayList (ExampleEnum .ENUM_CONST_1 , ExampleEnum .ENUM_CONST_2 ), result .getEnumArray ());
10951113 }
10961114}
You can’t perform that action at this time.
0 commit comments