This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Option Explicit | |
Option Private Module | |
'@TestModule | |
'@Folder("Tests") | |
Private Assert As Object | |
'@ModuleInitialize | |
Public Sub ModuleInitialize() | |
'this method runs once per module. | |
Set Assert = CreateObject("Rubberduck.AssertClass") | |
End Sub | |
'@ModuleCleanup | |
Public Sub ModuleCleanup() | |
'this method runs once per module. | |
End Sub | |
'@TestInitialize | |
Public Sub TestInitialize() | |
'this method runs before every test in the module. | |
End Sub | |
'@TestCleanup | |
Public Sub TestCleanup() | |
'this method runs after every test in the module. | |
End Sub | |
'@TestMethod | |
Public Sub TestPasswordLengthIsTooSmall() | |
On Error GoTo TestFail | |
Assert.IsFalse (ValidatePasswordLength("bob")) | |
TestExit: | |
Exit Sub | |
TestFail: | |
Assert.Fail "Test raised an error: #" & Err.Number & " - " & Err.Description | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment