diff --git a/Source/ConfTest/vtKImportExportUtilitiesTester.cls b/Source/ConfTest/vtKImportExportUtilitiesTester.cls index a15512a..0c43a26 100644 --- a/Source/ConfTest/vtKImportExportUtilitiesTester.cls +++ b/Source/ConfTest/vtKImportExportUtilitiesTester.cls @@ -88,7 +88,7 @@ End Sub Public Sub TestNumberOfVBAUnitModules() ' Verify the correct number of VBAUnit Modules in the list - mAssert.Equals vtkVBAUnitModulesList.count, 18, "There are 18 VBAUnit Modules" + mAssert.Equals vtkVBAUnitModulesList.Count, 18, "There are 18 VBAUnit Modules" End Sub Public Sub TestVBAUnitMainIsTheFirstVBAUnitModule() diff --git a/Source/ConfTest/vtkConfManagerExcel11Tester.cls b/Source/ConfTest/vtkConfManagerExcel11Tester.cls index 432c802..366d01d 100644 --- a/Source/ConfTest/vtkConfManagerExcel11Tester.cls +++ b/Source/ConfTest/vtkConfManagerExcel11Tester.cls @@ -54,7 +54,7 @@ Private Const workbookNameWithConfigurationV10 As String = "WorkBookForConfigura Private Sub SaveThenReOpenNewWorkbook() ' Utility Function for saving then re-open the new workbook and re-initialize the configuration managers Dim savedNewWorkbookPath As String - savedNewWorkbookPath = newWorkbook.FullName + savedNewWorkbookPath = newWorkbook.fullName ' If newWorkbook.path = "" Then ' newWorkbook.Close SaveChanges:=True, Filename:=savedNewWorkbookPath ' Else diff --git a/Source/ConfTest/vtkConfManagerExcel12Tester.cls b/Source/ConfTest/vtkConfManagerExcel12Tester.cls index b7e3798..d971fa5 100644 --- a/Source/ConfTest/vtkConfManagerExcel12Tester.cls +++ b/Source/ConfTest/vtkConfManagerExcel12Tester.cls @@ -55,7 +55,7 @@ Private Const workbookNameWithConfigurationV11 As String = "WorkBookForConfigura Private Sub SaveThenReOpenNewWorkbook() ' Utility Function for saving then re-open the new workbook and re-initialize the configuration managers Dim savedNewWorkbookPath As String - savedNewWorkbookPath = newWorkbook.FullName + savedNewWorkbookPath = newWorkbook.fullName ' If newWorkbook.path = "" Then ' newWorkbook.Close SaveChanges:=True, Filename:=savedNewWorkbookPath ' Else @@ -128,7 +128,7 @@ Public Sub TestConfigurationSheetDoesntExistInNewWorkbook() ' using a fresh configuration Manager (with no default sheet initialized) Dim cm As New vtkConfigurationManagerExcel, Wb As Workbook, wbFullName As String Set Wb = vtkCreateExcelWorkbookForTestWithProjectName("NewWorkbook") ' create a fresh new Excel workbook - wbFullName = Wb.FullName + wbFullName = Wb.fullName mAssert.Should Not cm.isConfigurationInitializedForWorkbook(ExcelName:=Wb.name), "The Configuration sheet must not exist in new workbook" Wb.Close saveChanges:=False Kill PathName:=wbFullName diff --git a/Source/ConfTest/vtkInitializeVbaUnitTester.cls b/Source/ConfTest/vtkInitializeVbaUnitTester.cls index a89829a..d15fc18 100644 --- a/Source/ConfTest/vtkInitializeVbaUnitTester.cls +++ b/Source/ConfTest/vtkInitializeVbaUnitTester.cls @@ -33,7 +33,7 @@ Option Explicit Implements ITest Implements ITestCase -Private newWorkBook As Workbook +Private newWorkbook As Workbook Private Const projectName As String = "NewProject" Private newConfManager As vtkConfigurationManager @@ -54,12 +54,12 @@ End Property Private Sub ITestCase_SetUp(Assert As IAssert) Set mAssert = Assert - Set newWorkBook = vtkCreateExcelWorkbookForTestWithProjectName(projectName) ' create an Excel project for tests + Set newWorkbook = vtkCreateExcelWorkbookForTestWithProjectName(projectName) ' create an Excel project for tests Set newConfManager = vtkConfigurationManagerForProject(projectName) End Sub Private Sub ITestCase_TearDown() - vtkCloseAndKillWorkbook Wb:=newWorkBook ' close the new Excel project + vtkCloseAndKillWorkbook Wb:=newWorkbook ' close the new Excel project vtkResetConfigurationManagers ' reset all configuration managers End Sub diff --git a/Source/ConfTest/vtkModuleTester.cls b/Source/ConfTest/vtkModuleTester.cls index f425f94..953ad63 100644 --- a/Source/ConfTest/vtkModuleTester.cls +++ b/Source/ConfTest/vtkModuleTester.cls @@ -72,7 +72,7 @@ Public Sub Test_ModuleCollection_Count() ' This test verifies the count of modules collection property of Configuration Management ' just initialized from an Excel worlbook - mAssert.Equals confManager.modules.count, 4, "Number of modules in the Test workbook" + mAssert.Equals confManager.modules.Count, 4, "Number of modules in the Test workbook" End Sub Public Sub Test_AddedConfigurationCollection_Count() @@ -81,7 +81,7 @@ Public Sub Test_AddedConfigurationCollection_Count() confManager.addModule ("NewModule") - mAssert.Equals confManager.modules.count, 5, "Number of modules in the Test workbook with added module" + mAssert.Equals confManager.modules.Count, 5, "Number of modules in the Test workbook with added module" End Sub Public Sub Test_ModuleCollection_Parent() @@ -115,7 +115,7 @@ Public Sub Test_ModuleCollection_ID() ' collection just initialized from an Excel worlbook Dim i As Integer For i = 1 To 4 - mAssert.Equals confManager.modules(i).ID, "m" & i, "Expected ID for module " & i + mAssert.Equals confManager.modules(i).id, "m" & i, "Expected ID for module " & i Next i End Sub @@ -137,7 +137,7 @@ Public Sub Test_AddedModuleCollection_ID() confManager.addModule ("NewConfiguration") Dim i As Integer For i = 1 To 5 - mAssert.Equals confManager.modules(i).ID, "m" & i, "Expected ID of vtkModule " & i + mAssert.Equals confManager.modules(i).id, "m" & i, "Expected ID of vtkModule " & i Next i End Sub diff --git a/Source/ConfTest/vtkNormalizeTester.cls b/Source/ConfTest/vtkNormalizeTester.cls index 661bdf6..7c4b512 100644 --- a/Source/ConfTest/vtkNormalizeTester.cls +++ b/Source/ConfTest/vtkNormalizeTester.cls @@ -609,7 +609,7 @@ Public Sub Test_vtkNormalizeFile_onlyOneFileInFolder() vtkNormalizeFile dummyFile, getListOfIdentifiersToNormalize - mAssert.Equals fso.GetFolder(VBAToolKit.vtkTestPath).Files.count, 1, _ + mAssert.Equals fso.GetFolder(VBAToolKit.vtkTestPath).Files.Count, 1, _ "There must only be one file in the directory, no tmp file or old file." On Error GoTo 0 diff --git a/Source/ConfTest/vtkReferenceManagerTester.cls b/Source/ConfTest/vtkReferenceManagerTester.cls index dcac102..5470fb0 100644 --- a/Source/ConfTest/vtkReferenceManagerTester.cls +++ b/Source/ConfTest/vtkReferenceManagerTester.cls @@ -45,7 +45,7 @@ Private existingRefManager As vtkReferenceManager ' Reference Manager for the Private Sub SaveThenReOpenNewWorkbook() ' Utility Function for saving then re-open the new workbook and re-initialize the reference manager Dim savedNewWorkbookPath As String - savedNewWorkbookPath = newWorkbook.FullName + savedNewWorkbookPath = newWorkbook.fullName newWorkbook.Close saveChanges:=True Set newWorkbook = Workbooks.Open(fileName:=savedNewWorkbookPath) Set newRefManager = New vtkReferenceManager @@ -213,7 +213,7 @@ Public Sub TestAddConfiguration() mAssert.Equals ws.Range("E1"), existingWorkbook.VBProject.name & "_DEV", "Expected Title for DEV project column" mAssert.Equals ws.Range("F1"), "NewConfiguration", "Expected Title for the new configuration column" - mAssert.Equals existingRefManager.references(3).count, 0, "Number of references attached to the new configuration" + mAssert.Equals existingRefManager.references(3).Count, 0, "Number of references attached to the new configuration" Set confManager = Nothing @@ -349,7 +349,7 @@ Public Sub TestGetReferencesFromNewWorkbook() ' Test references for the main configuration (#1) Set c = newRefManager.references(1) - mAssert.Equals c.count, 10, "Reference count for the main configuration" + mAssert.Equals c.Count, 10, "Reference count for the main configuration" mAssert.Equals c(1).name, "VBA", "Reference for the main configuration" mAssert.Equals c(2).name, "Excel", "Reference for the main configuration" mAssert.Equals c(3).name, "stdole", "Reference for the main configuration" @@ -363,7 +363,7 @@ Public Sub TestGetReferencesFromNewWorkbook() ' Test references for the development configuration (#2) Set c = newRefManager.references(2) - mAssert.Equals c.count, 11, "Reference count for the development configuration" + mAssert.Equals c.Count, 11, "Reference count for the development configuration" mAssert.Equals c(1).name, "VBA", "Reference for the development configuration" mAssert.Equals c(2).name, "Excel", "Reference for the development configuration" mAssert.Equals c(3).name, "stdole", "Reference for the development configuration" @@ -411,7 +411,7 @@ Public Sub TestGetReferencesWithNullDevConf() ' Test references for the main configuration (#1) Set c = newRefManager.references(1) - mAssert.Equals c.count, 10, "Reference count for the main configuration" + mAssert.Equals c.Count, 10, "Reference count for the main configuration" mAssert.Equals c(1).name, "VBA", "Reference for the main configuration" mAssert.Equals c(2).name, "Excel", "Reference for the main configuration" mAssert.Equals c(3).name, "stdole", "Reference for the main configuration" @@ -425,7 +425,7 @@ Public Sub TestGetReferencesWithNullDevConf() ' Test references for the development configuration (#2) Set c = newRefManager.references(2) - mAssert.Equals c.count, 10, "Reference count for the development configuration" + mAssert.Equals c.Count, 10, "Reference count for the development configuration" mAssert.Equals c(1).name, "VBA", "Reference for the development configuration" mAssert.Equals c(2).name, "Excel", "Reference for the development configuration" mAssert.Equals c(3).name, "stdole", "Reference for the development configuration" @@ -457,11 +457,11 @@ Public Sub TestGetReferencesWithNoDevConf() ' Test references for the main configuration (#1) Set c = newRefManager.references(1) - mAssert.Equals c.count, 0, "Reference count for the main configuration" + mAssert.Equals c.Count, 0, "Reference count for the main configuration" ' Test references for the development configuration (#2) Set c = newRefManager.references(2) - mAssert.Equals c.count, 0, "Reference count for the development configuration" + mAssert.Equals c.Count, 0, "Reference count for the development configuration" On Error GoTo 0 Exit Sub diff --git a/Source/ConfTest/vtkTestUtilitiesTester.cls b/Source/ConfTest/vtkTestUtilitiesTester.cls index d1f11e9..cb7f188 100644 --- a/Source/ConfTest/vtkTestUtilitiesTester.cls +++ b/Source/ConfTest/vtkTestUtilitiesTester.cls @@ -523,8 +523,8 @@ Private Sub assertTestFolderIsEmpty(mAssert As IAssert) Dim fso As New FileSystemObject, folderTest As Folder Set folderTest = fso.GetFolder(VBAToolKit.vtkTestPath) - mAssert.Equals folderTest.Files.count, 0, "All files hasn't been deleted" - mAssert.Equals folderTest.SubFolders.count, 0, "All folders hasn't been deleted" + mAssert.Equals folderTest.Files.Count, 0, "All files hasn't been deleted" + mAssert.Equals folderTest.SubFolders.Count, 0, "All folders hasn't been deleted" End Sub '--------------------------------------------------------------------------------------- ' Procedure : Test_vtkResetTestFolder_OneFile diff --git a/Source/VbaUnit/TestClassLister.cls b/Source/VbaUnit/TestClassLister.cls index d3691cf..d7e4f17 100644 --- a/Source/VbaUnit/TestClassLister.cls +++ b/Source/VbaUnit/TestClassLister.cls @@ -10,12 +10,12 @@ Attribute VB_Exposed = False Option Explicit Public Function TestClasses() As Collection - Dim Components As VBComponents, Component As VBComponent + Dim Components As VBComponents, component As VBComponent Set TestClasses = New Collection Set Components = Application.VBE.ActiveVBProject.VBComponents - For Each Component In Components - If IsClassModule(Component.Type) And IsTestClassName(Component.name) Then - TestClasses.Add Component.name + For Each component In Components + If IsClassModule(component.Type) And IsTestClassName(component.name) Then + TestClasses.Add component.name End If Next End Function @@ -43,6 +43,7 @@ Public Function SelectTestClass(TestClassName As String) As ITest Case "vtkWorkbookIsOpenTester": Set SelectTestClass = New vtkWorkbookIsOpenTester Case "vtkConfManagerExcel10Tester": Set SelectTestClass = New vtkConfManagerExcel10Tester Case "vtkConfManagerExcel11Tester": Set SelectTestClass = New vtkConfManagerExcel11Tester + Case "vtkConfManagerExcel12Tester": Set SelectTestClass = New vtkConfManagerExcel12Tester Case "vtkConfigurationManagersTester": Set SelectTestClass = New vtkConfigurationManagersTester Case "vtkProjectsTester": Set SelectTestClass = New vtkProjectsTester Case "vtkProjectTester": Set SelectTestClass = New vtkProjectTester @@ -64,7 +65,6 @@ Public Function SelectTestClass(TestClassName As String) As ITest Case "vtkReferenceManagerTester": Set SelectTestClass = New vtkReferenceManagerTester Case "vtkConfManagerXML20Tester": Set SelectTestClass = New vtkConfManagerXML20Tester Case "vtkRecreateConfXMLTester": Set SelectTestClass = New vtkRecreateConfXMLTester - Case "vtkConfManagerExcel12Tester": Set SelectTestClass = New vtkConfManagerExcel12Tester Case Else: End Select End Function