55using System . Threading . Tasks ;
66using Xunit ;
77
8- namespace QAToolKit . Engine . Database . Test
8+ namespace QAToolKit . Engine . Database . Test . Generators
99{
1010 public class PostgresqlTestGeneratorTests
1111 {
@@ -17,9 +17,9 @@ public async Task PostgresqlTableExistScriptTest_Success()
1717 options . AddDatabaseObjectExitsRule ( new string [ ] { "mytable" } , DatabaseObjectType . Table ) ;
1818 } ) ;
1919
20- var results = new List < DatabaseScript >
20+ var results = new List < DatabaseTest >
2121 {
22- new DatabaseScript (
22+ new DatabaseTest (
2323 "mytable" ,
2424 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""tables"" WHERE ""table_name"" = 'mytable');",
2525 DatabaseTestType . ObjectExist ,
@@ -38,9 +38,9 @@ public async Task PostgresqlViewExistScriptTest_Success()
3838 options . AddDatabaseObjectExitsRule ( new string [ ] { "myview" } , DatabaseObjectType . View ) ;
3939 } ) ;
4040
41- var results = new List < DatabaseScript >
41+ var results = new List < DatabaseTest >
4242 {
43- new DatabaseScript (
43+ new DatabaseTest (
4444 "myview" ,
4545 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""views"" WHERE ""table_name"" = 'myview');",
4646 DatabaseTestType . ObjectExist ,
@@ -59,9 +59,9 @@ public async Task PostgresqlStoredProcedureExistScriptTest_Success()
5959 options . AddDatabaseObjectExitsRule ( new string [ ] { "mystoredprocedure" } , DatabaseObjectType . StoredProcedure ) ;
6060 } ) ;
6161
62- var results = new List < DatabaseScript >
62+ var results = new List < DatabaseTest >
6363 {
64- new DatabaseScript (
64+ new DatabaseTest (
6565 "mystoredprocedure" ,
6666 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""routines"" WHERE ""routine_name"" = 'mystoredprocedure');",
6767 DatabaseTestType . ObjectExist ,
@@ -80,14 +80,14 @@ public async Task PostgresqlMultipleTableExistScriptTest_Success()
8080 options . AddDatabaseObjectExitsRule ( new string [ ] { "table1" , "table2" } , DatabaseObjectType . Table ) ;
8181 } ) ;
8282
83- var results = new List < DatabaseScript >
83+ var results = new List < DatabaseTest >
8484 {
85- new DatabaseScript (
85+ new DatabaseTest (
8686 "table1" ,
8787 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""tables"" WHERE ""table_name"" = 'table1');",
8888 DatabaseTestType . ObjectExist ,
8989 DatabaseKind . PostgreSQL ) ,
90- new DatabaseScript (
90+ new DatabaseTest (
9191 "table2" ,
9292 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""tables"" WHERE ""table_name"" = 'table2');",
9393 DatabaseTestType . ObjectExist ,
@@ -106,14 +106,14 @@ public async Task PostgresqlMultipleViewExistScriptTest_Success()
106106 options . AddDatabaseObjectExitsRule ( new string [ ] { "view1" , "view2" } , DatabaseObjectType . View ) ;
107107 } ) ;
108108
109- var results = new List < DatabaseScript >
109+ var results = new List < DatabaseTest >
110110 {
111- new DatabaseScript (
111+ new DatabaseTest (
112112 "view1" ,
113113 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""views"" WHERE ""table_name"" = 'view1');",
114114 DatabaseTestType . ObjectExist ,
115115 DatabaseKind . PostgreSQL ) ,
116- new DatabaseScript (
116+ new DatabaseTest (
117117 "view2" ,
118118 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""views"" WHERE ""table_name"" = 'view2');",
119119 DatabaseTestType . ObjectExist ,
@@ -132,14 +132,14 @@ public async Task PostgresqlMultipleStoredProcedureExistScriptTest_Success()
132132 options . AddDatabaseObjectExitsRule ( new string [ ] { "sp1" , "sp2" } , DatabaseObjectType . StoredProcedure ) ;
133133 } ) ;
134134
135- var results = new List < DatabaseScript >
135+ var results = new List < DatabaseTest >
136136 {
137- new DatabaseScript (
137+ new DatabaseTest (
138138 "sp1" ,
139139 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""routines"" WHERE ""routine_name"" = 'sp1');",
140140 DatabaseTestType . ObjectExist ,
141141 DatabaseKind . PostgreSQL ) ,
142- new DatabaseScript (
142+ new DatabaseTest (
143143 "sp2" ,
144144 $@ "SELECT EXISTS(SELECT * FROM ""information_schema"".""routines"" WHERE ""routine_name"" = 'sp2');",
145145 DatabaseTestType . ObjectExist ,
@@ -179,9 +179,9 @@ public async Task PostgresqlRecordExistScriptTest_Success()
179179 } ) ;
180180 } ) ;
181181
182- var results = new List < DatabaseScript >
182+ var results = new List < DatabaseTest >
183183 {
184- new DatabaseScript (
184+ new DatabaseTest (
185185 "mytable" ,
186186 $@ "SELECT EXISTS(SELECT * FROM ""mytable"" WHERE ""name"" = 'myname');",
187187 DatabaseTestType . RecordExist ,
@@ -209,9 +209,9 @@ public async Task PostgresqlRecordCountScriptTest_Success()
209209 } ) ;
210210 } ) ;
211211
212- var results = new List < DatabaseScript >
212+ var results = new List < DatabaseTest >
213213 {
214- new DatabaseScript (
214+ new DatabaseTest (
215215 "mytable" ,
216216 $@ "SELECT EXISTS (SELECT * FROM ""mytable"" WHERE (SELECT COUNT(*) AS ""count"" FROM ""mytable"") = 100);",
217217 DatabaseTestType . RecordCount ,
0 commit comments