I've released a new version of SimplyVBUnit
for VB6. Though this is not a VBCorLib specific post, I felt it should be shared anyways.
After using NUnit for awhile now, I've come to love the constraint based assertion model. It provides a great deal of constraints right out of the box. The constraint based method allows me to create my own constraints if necessary. Then I started using the TestCase attribute (originally RowData) and have enjoyed that ability. So with that I decided to update SimplyVBUnit
to provide as much capabilities with regards to constraints and test case data functions as I could.SimplyVBUnit
provides numerous constraints like NUnit and you can write your own if necessary. The constraints can be changed together providing even greater capabilities than the old method. In the old method there was no built in way to assert that a value was equal to more than one value.
The old way for asserting against multiple values:
Assert.IsTrue MyValue = 1 Or MyValue = 2
The old method does work for the most part, but it doesn't help you when it fails. All you get is that the assertion was false.
The new constraint based method:
Assert.That MyValue, Iz.EqualTo(1).OrElse.EqualTo(2)
The new method reads exactly what you want and if there is a failure you're told exactly what was expected. Anyways, this is a very very tiny portion of the power of constraints when using SimplyVBUnit
The test case capabilities can be involved so I won't go into any details here. Since VB6 doesn't support attributes like .Net I made a pretty good alternative. It's still very powerful in providing the ability to pass parameters to test methods.
So if you unit test in VB6 give SimplyVBUnit
3.0 a try.