|
- Option Explicit
-
- Dim fso
- Dim testsDir
- Dim repoRoot
- Dim coreDir
- Dim bootStream
- Dim frameworkCode
-
- Set fso = CreateObject("Scripting.FileSystemObject")
-
- testsDir = fso.GetParentFolderName(WScript.ScriptFullName) & "\"
- repoRoot = fso.GetParentFolderName(Left(testsDir, Len(testsDir) - 1)) & "\"
- coreDir = repoRoot & "Core\"
-
- ' Bootstrap: load the framework/fakes before any helper it defines (like
- ' IncludeAspClass) exists to be called.
- Set bootStream = fso.OpenTextFile(testsDir & "TestSupport.vbs", 1)
- frameworkCode = bootStream.ReadAll
- bootStream.Close
- ExecuteGlobal frameworkCode
-
- ' --- Core classes (ASP files - strip <% %> before executing) ---
- IncludeAspClass coreDir & "App.asp"
- IncludeAspClass coreDir & "Router.asp"
- IncludeAspClass coreDir & "HttpRequest.asp"
- IncludeAspClass coreDir & "ClockService.asp"
- IncludeAspClass coreDir & "Controllers\HomeController.asp"
- IncludeAspClass coreDir & "Controllers\GreetController.asp"
- IncludeAspClass coreDir & "Controllers\NotFoundController.asp"
- IncludeAspClass coreDir & "Dispatcher.asp"
-
- ' --- Test suites ---
- IncludeVbsFile testsDir & "RouterTests.vbs"
- IncludeVbsFile testsDir & "AppTests.vbs"
- IncludeVbsFile testsDir & "HttpRequestTests.vbs"
- IncludeVbsFile testsDir & "ControllerTests.vbs"
- IncludeVbsFile testsDir & "DispatcherTests.vbs"
-
- PrintSummary
-
- If HasFailures() Then
- WScript.Quit 1
- Else
- WScript.Quit 0
- End If
|