Skip to content

Commit d105035

Browse files
committed
refactored code
Signed-off-by: Max Stemplinger <ms@campudus.com>
1 parent 9bb597f commit d105035

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

src/test/scala/io/vertx/asyncsql/test/SqlTestVerticle.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ abstract class SqlTestVerticle extends TestVerticle with BaseVertxIntegrationTes
8080
| );
8181
""".stripMargin
8282

83-
protected def createTableStatement(tableName: String) = """
84-
DROP TABLE IF EXISTS """ + tableName + """;
85-
CREATE TABLE """ + tableName + """ (
83+
protected def createTableStatement(tableName: String) = s"""
84+
DROP TABLE IF EXISTS $tableName;
85+
CREATE TABLE $tableName (
8686
id SERIAL,
8787
name VARCHAR(255),
8888
email VARCHAR(255) UNIQUE,

src/test/scala/io/vertx/asyncsql/test/mysql/MySqlTest.scala

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@ class MySqlTest extends SqlTestVerticle with BaseSqlTests {
1919
| );
2020
""".stripMargin
2121

22-
override def createTableStatement(tableName: String) = """
23-
CREATE TABLE """ + tableName + """ (
24-
id INT NOT NULL AUTO_INCREMENT,
25-
name VARCHAR(255),
26-
email VARCHAR(255) UNIQUE,
27-
is_male BOOLEAN,
28-
age INT,
29-
money FLOAT,
30-
wedding_date DATE,
31-
PRIMARY KEY (id)
32-
);"""
22+
override def createTableStatement(tableName: String) = s"""
23+
CREATE TABLE $tableName (
24+
id INT NOT NULL AUTO_INCREMENT,
25+
name VARCHAR(255),
26+
email VARCHAR(255) UNIQUE,
27+
is_male BOOLEAN,
28+
age INT,
29+
money FLOAT,
30+
wedding_date DATE,
31+
PRIMARY KEY (id)
32+
);""".stripMargin
3333

34-
override def createTableTestTwo: String = s"""CREATE TABLE test_two (
34+
override def createTableTestTwo: String = """CREATE TABLE test_two (
3535
| id SERIAL,
3636
| name VARCHAR(255),
3737
| one_id BIGINT UNSIGNED NOT NULL,

0 commit comments

Comments
 (0)