Skip to content

Instantly share code, notes, and snippets.

@bervukas
Last active March 30, 2017 09:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bervukas/99d59653f79b5776bb910dffaba9d7fc to your computer and use it in GitHub Desktop.
Save bervukas/99d59653f79b5776bb910dffaba9d7fc to your computer and use it in GitHub Desktop.
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