As a newbie to TDD, I am trying to write a test assuming that a property has changed its value to PropertyGrid (C #, WinForms, .NET 3.5).
Changing the property of an object in the property grid does not result in an event (fairly true, since this is an event with a raised user interface, so I can understand why a change in the object belonging to it may not be visible to it).
I also had the same problem with the fact that when the SelectedNode property is changed, AfterSelect is triggered in the TreeView.
I could have a function that my unit test can call, which mimics the code that fires the UI event, but it will clutter up my code, and if I do not make it public, I will have to write all my tests in the same project or even the class of objects I'm testing (again, I see this as a mess). It seems ugly to me and will suffer from maintainability problems.
Is there a convention to run a similar UI unit test
johnc source
share