@@ -27,78 +27,78 @@ public class SqlTableTest {
27
27
@ Test
28
28
public void testSchemaSupplierEmpty () {
29
29
SqlTable table = new SqlTable (Optional ::empty , "my_table" );
30
- assertThat (table .name ()).isEqualTo ("my_table" );
30
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("my_table" );
31
31
}
32
32
33
33
@ Test
34
34
public void testSchemaSupplierWithValue () {
35
35
SqlTable table = new SqlTable (() -> Optional .of ("my_schema" ), "my_table" );
36
- assertThat (table .name ()).isEqualTo ("my_schema.my_table" );
36
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("my_schema.my_table" );
37
37
}
38
38
39
39
@ Test
40
40
public void testSingletonSchemaSupplier () {
41
41
SqlTable table = new SqlTable (MySchemaSupplier .instance (), "my_table" );
42
- assertThat (table .name ()).isEqualTo ("first_schema.my_table" );
42
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("first_schema.my_table" );
43
43
}
44
44
45
45
@ Test
46
46
public void testThatSchemaSupplierDoesDelay () {
47
47
MySchemaSupplier schemaSupplier = new MySchemaSupplier ();
48
48
SqlTable table = new SqlTable (schemaSupplier , "my_table" );
49
- assertThat (table .name ()).isEqualTo ("first_schema.my_table" );
49
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("first_schema.my_table" );
50
50
51
51
schemaSupplier .setFirst (false );
52
- assertThat (table .name ()).isEqualTo ("second_schema.my_table" );
52
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("second_schema.my_table" );
53
53
}
54
54
55
55
@ Test
56
56
public void testCatalogAndSchemaSupplierEmpty () {
57
57
SqlTable table = new SqlTable (Optional ::empty , Optional ::empty , "my_table" );
58
- assertThat (table .name ()).isEqualTo ("my_table" );
58
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("my_table" );
59
59
}
60
60
61
61
@ Test
62
62
public void testCatalogSupplierWithValue () {
63
63
SqlTable table = new SqlTable (() -> Optional .of ("my_catalog" ), Optional ::empty , "my_table" );
64
- assertThat (table .name ()).isEqualTo ("my_catalog..my_table" );
64
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("my_catalog..my_table" );
65
65
}
66
66
67
67
@ Test
68
68
public void testThatCatalogSupplierDoesDelay () {
69
69
MyCatalogSupplier catalogSupplier = new MyCatalogSupplier ();
70
70
SqlTable table = new SqlTable (catalogSupplier , Optional ::empty , "my_table" );
71
- assertThat (table .name ()).isEqualTo ("first_catalog..my_table" );
71
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("first_catalog..my_table" );
72
72
73
73
catalogSupplier .setFirst (false );
74
- assertThat (table .name ()).isEqualTo ("second_catalog..my_table" );
74
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("second_catalog..my_table" );
75
75
}
76
76
77
77
@ Test
78
78
public void testThatCatalogSupplierAndSchemaSupplierBothDelay () {
79
79
MyCatalogSupplier catalogSupplier = new MyCatalogSupplier ();
80
80
MySchemaSupplier schemaSupplier = new MySchemaSupplier ();
81
81
SqlTable table = new SqlTable (catalogSupplier , schemaSupplier , "my_table" );
82
- assertThat (table .name ()).isEqualTo ("first_catalog.first_schema.my_table" );
82
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("first_catalog.first_schema.my_table" );
83
83
84
84
catalogSupplier .setFirst (false );
85
- assertThat (table .name ()).isEqualTo ("second_catalog.first_schema.my_table" );
85
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("second_catalog.first_schema.my_table" );
86
86
87
87
catalogSupplier .setFirst (true );
88
88
schemaSupplier .setFirst (false );
89
- assertThat (table .name ()).isEqualTo ("first_catalog.second_schema.my_table" );
89
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("first_catalog.second_schema.my_table" );
90
90
91
91
catalogSupplier .setFirst (false );
92
- assertThat (table .name ()).isEqualTo ("second_catalog.second_schema.my_table" );
92
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("second_catalog.second_schema.my_table" );
93
93
94
94
catalogSupplier .setEmpty (true );
95
- assertThat (table .name ()).isEqualTo ("second_schema.my_table" );
95
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("second_schema.my_table" );
96
96
97
97
schemaSupplier .setEmpty (true );
98
- assertThat (table .name ()).isEqualTo ("my_table" );
98
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("my_table" );
99
99
100
100
catalogSupplier .setEmpty (false );
101
- assertThat (table .name ()).isEqualTo ("second_catalog..my_table" );
101
+ assertThat (table .fullyQualifiedTableName ()).isEqualTo ("second_catalog..my_table" );
102
102
}
103
103
104
104
public static class MySchemaSupplier implements Supplier <Optional <String >> {
0 commit comments