I am currently in a failing test state:

I see that the expected and actual values are not the same type in the test.
This means that I asserted a 1 of type Long would be a 1 of type Integer. I believe that’s the default type of 1. VBA is usually pretty nice in that it converts variables to the needed type as you use them, but RubberDuck is set to strongly check my types meaning they have to be excplicitly the same.
Since my method in FormListener returns a number of type Long, my test needs to compare it to a type of Long. Here is the offending line of code:
So if I change it using the CLng() function which converts the passed variable to a Long, the new code looks like this:
And now I expect it to pass. And yay, I’m right!

Ok, I am now at the refactor step. I do see a bunch of repeated code in my module. At each new test I am creating a variable called “FormListenerTest As FormListener” and then I am doing a “Set FormListenerTest = New FormListener”
I think I will move these lines to the TestInitialize module to run them to have a fresh FormListener object for every test. I also destroy the FormListener object at the end of every test so far so I will also refactor that into the TestCleanup module. Note: I am using module interchangeably with the word sub. Also, the comments are kind of driving me nuts and the test code is very unreadable for me. So I’m going to remove the “training wheel” comments provided by the RubberDuck system when it created all the test module stubs.
Ok, that is done and the tests all still pass, so my refactoring did not affect any of the tests. If it had, I would have to correct it before moving on to create a new failing test. Here now is my code. It is an improvement, but I still think it could stand to be organized a little better, but I don’t feel like continuing to refactor at the moment. I’m not sure exactly what else to do. The comments still in it are actually used to control RubberDuck so I left those in. That would mess up the tests I think if I removed them. Anyway, here is the test module code now: