Skip to content

Commit f9947da

Browse files
committed
Fixed style
1 parent f60781d commit f9947da

File tree

1 file changed

+40
-36
lines changed
  • src/test/kotlin/g3501_3600/s3580_find_consistently_improving_employees

1 file changed

+40
-36
lines changed

src/test/kotlin/g3501_3600/s3580_find_consistently_improving_employees/MysqlTest.kt

Lines changed: 40 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package g3501_3600.s3580_find_consistently_improving_employees
22

3-
import org.hamcrest.CoreMatchers
43
import org.hamcrest.CoreMatchers.equalTo
5-
import org.hamcrest.MatcherAssert
64
import org.hamcrest.MatcherAssert.assertThat
75
import org.junit.jupiter.api.Test
86
import org.zapodot.junit.db.annotations.EmbeddedDatabase
@@ -17,33 +15,37 @@ import javax.sql.DataSource
1715

1816
@EmbeddedDatabaseTest(
1917
compatibilityMode = CompatibilityMode.MySQL,
20-
initialSqls = [("CREATE TABLE employees(employee_id INTEGER, name VARCHAR(255)); "
21-
+ "INSERT INTO employees (employee_id, name) VALUES"
22-
+ " (1, 'Alice Johnson'),"
23-
+ " (2, 'Bob Smith'),"
24-
+ " (3, 'Carol Davis'),"
25-
+ " (4, 'David Wilson'),"
26-
+ " (5, 'Emma Brown');"
27-
+ "CREATE TABLE performance_reviews(review_id INTEGER, employee_id INTEGER"
28-
+ ", review_date DATE, rating INTEGER); "
29-
+ "INSERT INTO performance_reviews (review_id, employee_id, review_date, rating) VALUES"
30-
+ " (1, 1, '2023-01-15', 2),"
31-
+ " (2, 1, '2023-04-15', 3),"
32-
+ " (3, 1, '2023-07-15', 4),"
33-
+ " (4, 1, '2023-10-15', 5),"
34-
+ " (5, 2, '2023-02-01', 3),"
35-
+ " (6, 2, '2023-05-01', 2),"
36-
+ " (7, 2, '2023-08-01', 4),"
37-
+ " (8, 2, '2023-11-01', 5),"
38-
+ " (9, 3, '2023-03-10', 1),"
39-
+ " (10, 3, '2023-06-10', 2),"
40-
+ " (11, 3, '2023-09-10', 3),"
41-
+ " (12, 3, '2023-12-10', 4),"
42-
+ " (13, 4, '2023-01-20', 4),"
43-
+ " (14, 4, '2023-04-20', 4),"
44-
+ " (15, 4, '2023-07-20', 4),"
45-
+ " (16, 5, '2023-02-15', 3),"
46-
+ " (17, 5, '2023-05-15', 2);")]
18+
initialSqls = [
19+
(
20+
"CREATE TABLE employees(employee_id INTEGER, name VARCHAR(255)); " +
21+
"INSERT INTO employees (employee_id, name) VALUES" +
22+
" (1, 'Alice Johnson')," +
23+
" (2, 'Bob Smith')," +
24+
" (3, 'Carol Davis')," +
25+
" (4, 'David Wilson')," +
26+
" (5, 'Emma Brown');" +
27+
"CREATE TABLE performance_reviews(review_id INTEGER, employee_id INTEGER" +
28+
", review_date DATE, rating INTEGER); " +
29+
"INSERT INTO performance_reviews (review_id, employee_id, review_date, rating) VALUES" +
30+
" (1, 1, '2023-01-15', 2)," +
31+
" (2, 1, '2023-04-15', 3)," +
32+
" (3, 1, '2023-07-15', 4)," +
33+
" (4, 1, '2023-10-15', 5)," +
34+
" (5, 2, '2023-02-01', 3)," +
35+
" (6, 2, '2023-05-01', 2)," +
36+
" (7, 2, '2023-08-01', 4)," +
37+
" (8, 2, '2023-11-01', 5)," +
38+
" (9, 3, '2023-03-10', 1)," +
39+
" (10, 3, '2023-06-10', 2)," +
40+
" (11, 3, '2023-09-10', 3)," +
41+
" (12, 3, '2023-12-10', 4)," +
42+
" (13, 4, '2023-01-20', 4)," +
43+
" (14, 4, '2023-04-20', 4)," +
44+
" (15, 4, '2023-07-20', 4)," +
45+
" (16, 5, '2023-02-15', 3)," +
46+
" (17, 5, '2023-05-15', 2);"
47+
),
48+
],
4749
)
4850
internal class MysqlTest {
4951
@Test
@@ -54,10 +56,12 @@ internal class MysqlTest {
5456
statement.executeQuery(
5557
BufferedReader(
5658
FileReader(
57-
("src/main/kotlin/g3501_3600/"
58-
+ "s3580_find_consistently_improving_employees/"
59-
+ "script.sql")
60-
)
59+
(
60+
"src/main/kotlin/g3501_3600/" +
61+
"s3580_find_consistently_improving_employees/" +
62+
"script.sql"
63+
),
64+
),
6165
)
6266
.lines()
6367
.collect(Collectors.joining("\n"))
@@ -67,21 +71,21 @@ internal class MysqlTest {
6771
assertThat<String>(resultSet.getNString(1), equalTo<String>("2"))
6872
assertThat<String>(
6973
resultSet.getNString(2),
70-
equalTo<String>("Bob Smith")
74+
equalTo<String>("Bob Smith"),
7175
)
7276
assertThat<String>(resultSet.getNString(3), equalTo<String>("3"))
7377
assertThat<Boolean>(resultSet.next(), equalTo<Boolean>(true))
7478
assertThat<String>(resultSet.getNString(1), equalTo<String>("1"))
7579
assertThat<String>(
7680
resultSet.getNString(2),
77-
equalTo<String>("Alice Johnson")
81+
equalTo<String>("Alice Johnson"),
7882
)
7983
assertThat<String>(resultSet.getNString(3), equalTo<String>("2"))
8084
assertThat<Boolean>(resultSet.next(), equalTo<Boolean>(true))
8185
assertThat<String>(resultSet.getNString(1), equalTo<String>("3"))
8286
assertThat<String>(
8387
resultSet.getNString(2),
84-
equalTo<String>("Carol Davis")
88+
equalTo<String>("Carol Davis"),
8589
)
8690
assertThat<String>(resultSet.getNString(3), equalTo<String>("2"))
8791
assertThat<Boolean>(resultSet.next(), equalTo<Boolean>(false))

0 commit comments

Comments
 (0)