You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello Kevin.
I have problems importing the some of the class modules from the VBAUnitTester
As with the SQL classes I replaced LF with CR LF. But still classes like LoggerErrorHandlingTests.cls
(below) import as Module without name. Seems something is missing in the header section.
Thanks for your support.
`Implements iTestCase
Dim TestCase As iTestCase
' Constructor: Class_Initialize
' Initialize class members
Private Sub Class_Initialize()
Set TestCase = CreateTestCase()
End Sub
Sub iTestCase_Setup()
Dim SpecialTestCase As iTestCase
Set SpecialTestCase = New PostLogTests
SpecialTestCase.RunTest "ExpectExceptionSetupTest"
End Sub
Sub iTestCase_TearDown()
End Sub
' Function: iTestCase_GetObject
' Returns this object
Function iTestCase_GetObject()
Set iTestCase_GetObject = New LoggerErrorHandlingTests
End Function
'Function: ErrorCaughtTest
' Ensure that when an expected runtime error is generated it is not logged, and the test is still passing.
Sub ErrorCaughtTest()
Status = TestReporter.GetLastTestStatus
PassFail = Status(2)
TestReporter.RemoveLastTest
AssertEquals PassFail, "Passing", "Test should be passing because an expected error was generated. Status is " & PassFail
End Sub
' Sub: iTestCase_RunTest
' Run a specific test.
Public Sub iTestCase_RunTest(Test As String, Optional clsObj = Nothing)
TestCase.RunTest Test, Me
End Sub
' Sub: iTestCase_RunAllTests
' Run all tests.
Public Sub iTestCase_RunAllTests(Optional ByVal clsObj = Nothing)
TestCase.RunAllTests Me
End Sub`
The text was updated successfully, but these errors were encountered:
Thanks. Did you notice that any files have the wrong line endings? You’re probably right about the header. I often get in the habit of just copying the code into already existing classModules so I skip this step.
If you are familiar with git or using GitHub, feel free to submit pull requests for any issues you discover. I’m also happy to discuss how to make this project easier to use from a developer or just “plan user” perspective. I’m not the world’s greatest VBA coder.
Hello Kevin.
I have problems importing the some of the class modules from the VBAUnitTester
As with the SQL classes I replaced LF with CR LF. But still classes like LoggerErrorHandlingTests.cls
(below) import as Module without name. Seems something is missing in the header section.
Thanks for your support.
`Implements iTestCase
Dim TestCase As iTestCase
' Constructor: Class_Initialize
' Initialize class members
Private Sub Class_Initialize()
Set TestCase = CreateTestCase()
End Sub
Sub iTestCase_Setup()
Dim SpecialTestCase As iTestCase
Set SpecialTestCase = New PostLogTests
SpecialTestCase.RunTest "ExpectExceptionSetupTest"
End Sub
Sub iTestCase_TearDown()
End Sub
' Function: iTestCase_GetObject
' Returns this object
Function iTestCase_GetObject()
Set iTestCase_GetObject = New LoggerErrorHandlingTests
End Function
'Function: ErrorCaughtTest
' Ensure that when an expected runtime error is generated it is not logged, and the test is still passing.
Sub ErrorCaughtTest()
Status = TestReporter.GetLastTestStatus
PassFail = Status(2)
TestReporter.RemoveLastTest
AssertEquals PassFail, "Passing", "Test should be passing because an expected error was generated. Status is " & PassFail
End Sub
' Sub: iTestCase_RunTest
' Run a specific test.
Public Sub iTestCase_RunTest(Test As String, Optional clsObj = Nothing)
TestCase.RunTest Test, Me
End Sub
' Sub: iTestCase_RunAllTests
' Run all tests.
Public Sub iTestCase_RunAllTests(Optional ByVal clsObj = Nothing)
TestCase.RunAllTests Me
End Sub`
The text was updated successfully, but these errors were encountered: