Does anyone knows there is a good message dialog service I could use to make message dialogs testable. It would be very nice if the message dialog service had some integrated translation possibilities. I could write this myself not that difficult to do but if it's exists why reinvent the wheel.

Comments

  1. You would need a bit of context to do sensible mocks.  What would you do in a test for a dialog that has the buttons "abort, retry, ignore"?  You probably need to test all options?  I guess you need to do the mockable wrappers for yourself - but as to translation engine driven dialogs, I know they are out there, but I don't use them.

    ReplyDelete
  2. Dialogs are very simple forms. Unfortunately, their use has turned them into function calls with a bunch of parameters. As forms, they're objects; they have data fields you want to initialize before you show them, and data you want to extract when they close. If you want to stub or mock them, you need to treat them as if they're forms, which means you'll need to wrap them.

    ReplyDelete
  3. Lars Fosdal David Schwartz​ I know how this should work. They look that common to me that I hoped there was some kind of wrapper service class created by someone ( doesn't need to be free ) - that would fit my needs - don't need anything fancy - ok cancel, yes no cancel - the most basic dialogs. Writting them myself would take me time and I hate spending time on things when I'm thinking they might exist. Maybe it's time to start some open source project for those common stuff.

    ReplyDelete

Post a Comment