TDD and Prism using Moq

Topics: Prism v2 - WPF 3.5, Prism v2 - WPF 4
May 31, 2010 at 7:05 AM

Hi all

I am new to Prism and try to learn as fast as possible.

Straight to my question.Is there anywhere a quick video on how you do TDD using Prism ideally with Moq?

Has anybody got an example on Prism and Moq? It  would be fantastic if somebody could share some projects where Prism and Moq are used. Tried to google but nothing really.

I would like to TDD everything I do in Prism and some examples would definitely help.

I know that in EntLib5 are also using Moq. Is the Prism Team  planning to use Moq in their test?

Thanks a lot


Jul 17, 2010 at 4:32 AM


The product team of Prism v4 is already using moq in their unit tests. Therefore, you would be able to find some sample in Prism v4 using this.

However, if I’m not wrong there are not videos regarding to this. Additionally, take into account that when you download a Prism drop, you won’t find the moq assemblies as they are not distributed. So you would need to manually download them and copy into the lib\[desktop|silverlight]\moq directory.

Please let me know if this helps.

Fernando Antivero

Jul 19, 2010 at 5:43 PM

I want to add a few things to the above response. We are using Moq, but we are not yet using it everywhere.  Lots of the existing unit tests still use hand-coded mocks and stubs.  We will be converting unit tests to use Moq as we make changes to the code and tests, but in all probability, not everything will be converted.

I hope that helps,

Michael Puleio

Jul 19, 2010 at 8:42 PM

Thanks a lot that is a start.

Not sure about the others but I also use the Practice and patterns project as a reference on how to do things. I was looking whether you used MOQ and learn how you handled and unit tested certain things.