Isolation Dependencies in Silverlight Unit Tests

I am working on writing a LOB application in Silverlight, and I am a little confused by all the obstacles that I face with unit testing.

  • PRISM uses many extension methods, which are essentially static methods, so they are not mock-ups.
  • All mocking frameworks that use dirty tricks to mock non-virtual and static methods do not work in Silverlight (for example, Moles, JustMock. Not sure about TypeMock Isolator.)

So my question is:

Is there a dependency highlighting strategy in Silverlight unit tests?

Am I missing something or just did not think about this problem correctly? Can I use user interface tests (for example, available in the new VS2010 Feature Pack 2) to get around this?

TIA

+3
source share
2 answers

Have you looked at other MVVM frameworks if you have such problems with Prism? Generally, all layers of a Silverlight application should be tested.

  • Models should be tested because they should not have anything to do with any user interface technology.
  • View models should be checked, because they should not refer to anything in the user interface
  • Views (XAML) are declarative
  • , . Silverlight Toolkit, , .
+1

silverunit ( ) Silverlight SilverUnit

0

Source: https://habr.com/ru/post/1777991/


All Articles