Skip to main content
Tweeted twitter.com/StackCodeReview/status/1579668434941792256
added 30 characters in body
Source Link

A little over a year ago, I [asked for feedback][1]asked for feedback on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

The TestResult object allows users to utilize UserDefinedEvents. The TestResult implements a CheckTest() method that raises three events: TestCompleted(), TestPassed(), and TestFailed(). TestCompleted is raised every time a test is run. TestPassed and TestFailed are conditionally raised depending on whether a test passed or failed respectively. Each of the events is passed a dictionary object called TestDict which contains a variety of information about the test(s). You can see an example of how these might be used below:

Set Col = New Collection
fluent.TestValue = testFluent.Of(Col).Should.Be.Something
Debug.Assert fluent.Should.Be.EqualTo(True)
Debug.Assert fluent.ShouldNot.Be.EqualTo(False)

Set Col = Nothing
fluent.TestValue = testFluent.Of(Col).Should.Be.Something
Debug.Assert fluent.Should.Be.EqualTo(False)
Debug.Assert fluent.ShouldNot.Be.EqualTo(True)

A little over a year ago, I [asked for feedback][1] on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

The TestResult object allows users to utilize UserDefinedEvents. The TestResult implements a CheckTest() method that raises three events: TestCompleted(), TestPassed(), and TestFailed(). TestCompleted is raised every time a test is run. TestPassed and TestFailed are conditionally raised depending on whether a test passed or failed respectively. You can see an example of how these might be used below:

fluent.TestValue = testFluent.Of(Col).Should.Be.Something
Debug.Assert fluent.Should.Be.EqualTo(True)
Debug.Assert fluent.ShouldNot.Be.EqualTo(False)

Set Col = Nothing
fluent.TestValue = testFluent.Of(Col).Should.Be.Something
Debug.Assert fluent.Should.Be.EqualTo(False)
Debug.Assert fluent.ShouldNot.Be.EqualTo(True)

A little over a year ago, I asked for feedback on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

The TestResult object allows users to utilize UserDefinedEvents. The TestResult implements a CheckTest() method that raises three events: TestCompleted(), TestPassed(), and TestFailed(). TestCompleted is raised every time a test is run. TestPassed and TestFailed are conditionally raised depending on whether a test passed or failed respectively. Each of the events is passed a dictionary object called TestDict which contains a variety of information about the test(s). You can see an example of how these might be used below:

Set Col = New Collection
fluent.TestValue = testFluent.Of(Col).Should.Be.Something
Debug.Assert fluent.Should.Be.EqualTo(True)
Debug.Assert fluent.ShouldNot.Be.EqualTo(False)

Set Col = Nothing
fluent.TestValue = testFluent.Of(Col).Should.Be.Something
Debug.Assert fluent.Should.Be.EqualTo(False)
Debug.Assert fluent.ShouldNot.Be.EqualTo(True)
deleted 38 characters in body
Source Link

A little over a year ago, I asked for feedback[asked for feedback][1] on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

Sub FluentUnitTestExample1FluentUnitTestExample2()
    Dim Result As cFluentcFluentOf
    Dim returnedResult As Variant
    
    '//Arrangearrange
    Set Result = New cFluentcFluentOf
    returnedResult = returnVal(5)
    
    '//Act
    With Result.TestValue = Of(returnedResult)
    
     '//Assert
        Debug.Assert Result.Should.Be.EqualTo(5)
    End With
End Sub

Sub FluentUnitTestExample2FluentUnitTestExample3()
    Dim Result As cFluentOf
    Dim returnedResult As Variant
    
    '//arrange
    Set Result = New cFluentOf
    returnedResult = returnVal(5)
    
    '//Act
    With Result.Of(returnedResult)
       & '//Assert
        Debug.Assert Result.Of(returnedResult).Should.Be.EqualTo(5)
    End With
End Sub

You can see examples of what the output of the PrintToSheet() method looks like herebelow:

enter image description here

A little over a year ago, I asked for feedback on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

Sub FluentUnitTestExample1
    Dim Result As cFluent
    Dim returnedResult As Variant
    
    '//Arrange
    Set Result = New cFluent
    returnedResult = returnVal(5)
    
    '//Act
    Result.TestValue = returnedResult
    
     '//Assert
    Debug.Assert Result.Should.Be.EqualTo(5)
End Sub

Sub FluentUnitTestExample2()
    Dim Result As cFluentOf
    Dim returnedResult As Variant
    
    '//arrange
    Set Result = New cFluentOf
    returnedResult = returnVal(5)
    
    '//Act
    With Result.Of(returnedResult)
        '//Assert
        Debug.Assert .Should.Be.EqualTo(5)
    End With
End Sub

You can see examples of what the output of the PrintToSheet() method looks like here

A little over a year ago, I [asked for feedback][1] on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

Sub FluentUnitTestExample2()
    Dim Result As cFluentOf
    Dim returnedResult As Variant
    
    '//arrange
    Set Result = New cFluentOf
    returnedResult = returnVal(5)
    
    '//Act
    With Result.Of(returnedResult)
        '//Assert
        Debug.Assert .Should.Be.EqualTo(5)
    End With
End Sub

Sub FluentUnitTestExample3()
    Dim Result As cFluentOf
    Dim returnedResult As Variant
    
    '//arrange
    Set Result = New cFluentOf
    returnedResult = returnVal(5)
    
    '//Act & Assert
    Debug.Assert Result.Of(returnedResult).Should.Be.EqualTo(5)
End Sub

You can see examples of what the output of the PrintToSheet() method looks like below:

enter image description here

Added URL
Source Link

A little over a year ago, I asked for feedbackasked for feedback on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

Note: You can read a detailed breakdown here

You can see examples of what the output of the PrintToSheet() method looks like here

A little over a year ago, I asked for feedback on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

Note: You can read a detailed breakdown here

A little over a year ago, I asked for feedback on Code Review for a unit testing framework I created in VBA. Development of this project has been off and on for the past year. Sometimes I wouldn't touch the project for months. Other times, I'd be working very intensely on pushing updates. The project has changed significantly since I last submitted it. So I thought I'd submit an updated version again for additional review. Below are some changes I've made since I submitted my request for Feedback.

You can see examples of what the output of the PrintToSheet() method looks like here

Added examples
Source Link
Loading
Source Link
Loading