How can you unit test a DelegateCommand

Posted by Damian on Stack Overflow See other posts from Stack Overflow or by Damian
Published on 2010-05-14T20:14:59Z Indexed on 2010/05/14 20:34 UTC
Read the original article Hit count: 266

I am trying to unit test my ViewModel and my SaveItem(save, CanSave) delegate command. I want to ensure that CanSave is called and returns the correct value given certain conditions. Basically, how can I invoke the delegate command from my unit test, actually it's more of an integration test. Obviously I could just test the return value of the CanSave method but I am trying to use BDD to the letter, ie. no code without a test first.

© Stack Overflow or respective owner

Related posts about prism

Related posts about unit-testing