mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-03-03 16:29:13 +00:00
HHH-10507 - Hibernate core test removing usage of Java 8 methods
This commit is contained in:
parent
57b32543ed
commit
eea9a943b3
@ -10,6 +10,7 @@
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
|
||||
@ -57,7 +58,7 @@ public void testSchemaUpdateApplyDelimiterToGeneratedSQL() throws Exception {
|
||||
su.setFormat( false );
|
||||
su.execute( Target.SCRIPT );
|
||||
|
||||
List<String> sqlLines = Files.readAllLines( output.toPath() );
|
||||
List<String> sqlLines = Files.readAllLines( output.toPath(), Charset.defaultCharset() );
|
||||
for ( String line : sqlLines ) {
|
||||
assertThat(
|
||||
"The expected delimiter is not applied " + line,
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.util.List;
|
||||
|
||||
@ -155,7 +156,7 @@ private void createSchema(Class[] annotatedClasses) {
|
||||
private void checkAlterTableStatement(AlterTableStatement alterTableStatement)
|
||||
throws Exception {
|
||||
final String expectedAlterTableStatement = alterTableStatement.toSQL();
|
||||
final List<String> sqlLines = Files.readAllLines( output.toPath() );
|
||||
final List<String> sqlLines = Files.readAllLines( output.toPath(), Charset.defaultCharset() );
|
||||
boolean found = false;
|
||||
for ( String line : sqlLines ) {
|
||||
if ( line.contains( expectedAlterTableStatement ) ) {
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
@ -71,7 +72,7 @@ public void testSchemaExportForeignKeysAreGeneratedAfterAllTheTablesAreCreated()
|
||||
.setFormat( false );
|
||||
schemaExport.create( true, false );
|
||||
|
||||
final List<String> sqlLines = Files.readAllLines( output.toPath() );
|
||||
final List<String> sqlLines = Files.readAllLines( output.toPath(), Charset.defaultCharset() );
|
||||
assertThat(
|
||||
"Expected alter table SCHEMA1.Child add constraint but is : " + sqlLines.get( 4 ),
|
||||
sqlLines.get( 4 ).startsWith( "alter table " ),
|
||||
|
Loading…
x
Reference in New Issue
Block a user