title: Mocking in Windows store app
body: <p>I'm not probably first who deals with mocking in windows store application for testing purpose. I would like to test my ViewModels and to use some of mocking frameworks to mock them. Of course, all of available (common) frameworks are not able to use in windows store application project.  I have one idea how to solve it but I'm not sure that it is best solution. My solution consists of these projects. Main point is to divide presentation layer to two parts :</p>
  
  <p><strong>Presentation</strong> - Windows store application</p>
  
  <p>Start-up project that contains only presentation views (Pages) and presentation parts that do not need to be tested. This project has reference to PresentationLogic.</p>
  
  <p><strong>PresentationLogic</strong> - Portable Class Library, Targets : Windows store application, .NET Framework 4.5</p>
  
  <p>This project contains all presentation logic like ViewModels, Converters, Helpers etc. that should be tested</p>
  
  <p><strong>UnitTests</strong> - Class library</p>
  
  <p>Classical class library containing unit tests with ability to mocking all interfaces from PresentationLogic. This library has reference to PresentationLogic.</p>
  
  <p>It is quite strange to divide Views and ViewModel to two layers but I did not find another solution for this. </p>
  
  <p>Do you have please any idea how to deal with this problem? What about splitting of the presentation layer to the two layers of another project type? Can it cause some problems in further development?</p>