I’m going to start the next test with something simple. A new type of field. I will add a checkbox to the test form and bind it to a Yes/No field and write a test to check to see if it updates the values as expected.
I added the checkbox to the form, added a new Yes/No column on the table, and bound the field to it.
I copied the existing text box change value test and updated it to use the checkbox and boolean values of True and False for the changes to the field:
This compiled fine without errors, Woo-hoo.
Then I ran all the tests. The new test did not pass, failing because it returned an empty collection for colResults.
All right, we got our failing test.
So I started digging into the failure. Turns out in the BeforeUpdate event of the FieldAuditor class we are only checking for text boxes and combo boxes:
I changed the conditional statements to a case statement for now and added the acCheckBox to the allowed controls to check:
And I tested again. And it surprised me that it passed. Ok. We’ll do another test next time…