Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 28dc857

Browse files
Update SQLUnitTests.bas
1 parent 65e9a26 commit 28dc857

File tree

1 file changed

+5
-39
lines changed

1 file changed

+5
-39
lines changed

‎testing/Modules/SQLUnitTests.bas‎

Lines changed: 5 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,7 @@
11
Attribute VB_Name = "SQLUnitTests"
2-
Public Function SQLlib_RunAllTests()
3-
TestList = Array("SQLlib_SQLDatabase", "SQLlib_SQLInsert", "SQLlib_SQLSelect", "SQLlib_SQLStatic", "SQLlib_SQLDelete", "SQLlib_SQLUpdate")
4-
SQLlib_RunAllTests = RunTestList(TestList)
5-
6-
'*****************Check Create*****************
7-
'Dim MyCreate As SQLCreate
8-
'Set MyCreate = Create_SQLCreate
9-
'With MyCreate
10-
' .Table = "users"
11-
' .Fields = Array(Array("id", "int"), Array("username", "varchar", 50))
12-
'End With
13-
'Dim Interfaced As iSQLQuery
14-
'Set Interfaced = MyCreate
15-
'CheckSQLValue Interfaced, "CREATE TABLE users (id int, username varchar(50))"
16-
17-
'*******************Check SubSelect****************************************
18-
'Dim MySubselect As New SQLSubselect
19-
'Set MySubselect.SelectSQL = MyOtherSelect
20-
'MySubselect.SelectAs = "user_id"
21-
'CheckSQLValue MySubselect, "(SELECT id FROM users WHERE name='admin') AS user_id"
22-
23-
'****************Check Where Group*****************************************
24-
'Dim MyWhereGroup As New SQLWhereGroup
25-
'Dim MyOtherWhere As New SQLCondition
26-
'MyOtherWhere.Create "type", "'toys'"
27-
'MyWhereGroup.SetGroup MyWhere, MyOtherWhere, "AND"
28-
'CheckSQLValue MyWhereGroup, "id=2 AND type='toys'"
29-
30-
'Dim MyThirdWhere As New SQLCondition
31-
'MyThirdWhere.Create "color", "'pink'"
32-
33-
'MyWhereGroup.AddWhere MyThirdWhere, "OR"
34-
'CheckSQLValue MyWhereGroup, "(id=2 AND type='toys') OR color='pink'"
35-
36-
'Dim MyOtherWhereGroup As New SQLWhereGroup
37-
'MyOtherWhereGroup.SetGroup MyWhere, MyThirdWhere, "OR"
38-
'MyWhereGroup.AddWhere MyOtherWhereGroup, "AND"
39-
'CheckSQLValue MyWhereGroup, "((id=2 AND type='toys') OR color='pink') AND (id=2 OR color='pink')"
40-
2+
Public Function RunTests()
3+
Dim TestConfig As iTestableProject
4+
Dim SQLLibTestConfig As New SQLlibTests
5+
Set TestConfig = SQLLibTestConfig
6+
TestConfig.Run
417
End Function

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /