fix checkstyle

This commit is contained in:
Enrico Olivelli 2020-10-28 11:09:58 +01:00
parent a998255a1e
commit 117f75ce0b
1 changed files with 6 additions and 3 deletions

View File

@ -147,11 +147,13 @@ public class TestHerdDBDictionary {
fk1.join(n1, p1);
String[] createTableSQL = dict.getCreateTableSQL(childTable);
assertEquals("CREATE TABLE `herddb`.`childTable` (`k1` VARCHAR NOT NULL, `n1` INTEGER, PRIMARY KEY (`k1`), CONSTRAINT `un1` UNIQUE (`n1`))", createTableSQL[0]);
assertEquals("CREATE TABLE `herddb`.`childTable` (`k1` VARCHAR NOT NULL, `n1` INTEGER, "
+ "PRIMARY KEY (`k1`), CONSTRAINT `un1` UNIQUE (`n1`))", createTableSQL[0]);
assertEquals(1, createTableSQL.length);
String[] addForeignKeySQL = dict.getAddForeignKeySQL(fk1);
assertEquals("ALTER TABLE `herddb`.`childTable` ADD CONSTRAINT `fk1` FOREIGN KEY (`n1`) REFERENCES `herddb`.`parentTable` (`p1`) ON DELETE CASCADE", addForeignKeySQL[0]);
assertEquals("ALTER TABLE `herddb`.`childTable` ADD CONSTRAINT `fk1` "
+ "FOREIGN KEY (`n1`) REFERENCES `herddb`.`parentTable` (`p1`) ON DELETE CASCADE", addForeignKeySQL[0]);
assertEquals(1, addForeignKeySQL.length);
String[] dropForeignKeySQL = dict.getDropForeignKeySQL(fk1, mockConnection);
@ -172,7 +174,8 @@ public class TestHerdDBDictionary {
// ON DELETE RESTRICT is the default behaviour, so no need to write it in DDL
fk2.setUpdateAction(ForeignKey.ACTION_NULL);
String[] addForeignKeySQL3 = dict.getAddForeignKeySQL(fk2);
assertEquals("ALTER TABLE `herddb`.`childTable` ADD CONSTRAINT `fk2` FOREIGN KEY (`n1`) REFERENCES `herddb`.`parentTable` (`p1`) ON UPDATE SET NULL", addForeignKeySQL3[0]);
assertEquals("ALTER TABLE `herddb`.`childTable` ADD CONSTRAINT `fk2` "
+ "FOREIGN KEY (`n1`) REFERENCES `herddb`.`parentTable` (`p1`) ON UPDATE SET NULL", addForeignKeySQL3[0]);
assertEquals(1, addForeignKeySQL3.length);
}