by Jonathan Halder | Feb 12, 2024 | MS Access, MS Access VBA Coding, TDD
Here we are, refactoring this function: Private Function SetFields_ChangeThem_ReturnDictionary(dctFieldName_arrStartAndEndVals As Dictionary) As Dictionary Dim testFormAuditor As FormAuditor Dim itm As Variant For Each itm In dctFieldName_arrStartAndEndVals...
by Jonathan Halder | Feb 9, 2024 | MS Access, MS Access VBA Coding, TDD
As I continue to refactor the test, this time I am going to try to create the dictionary object I think I want to get back and pass that to a helper function which will change the fields to the before state, instantiate the FormAuditor class, run a single BeforeUpdate...
by Jonathan Halder | Feb 8, 2024 | MS Access, MS Access VBA Coding, TDD
TDD is all about small changes and then testing and making sure things continue to run. I made the mistake yesterday of trying to refactor too much at once and I ended up leaving my system in an unrunnable state. Ideally, as you are developing, each change you make is...
by Jonathan Halder | Feb 7, 2024 | MS Access, MS Access VBA Coding, TDD
Ok, so now why am I creating all these objects in my test? How about creating the objects I want to see returned and use those to run the test on the form and then see if it’s the same objects I get back? I kinda feel like that is making the tests brittle...
by Jonathan Halder | Feb 6, 2024 | MS Access, MS Access Features, MS Access VBA Coding, TDD
We are in a refactor cycle, so it’s time to look at my mess and see what I can do to clean it up a bit. I had to make a number of changes to the test in order to test multiple fields at once. It didn’t work with my existing function which changed a single...