windows phone 7 - How to write a simple WP7 unit test using xUnitContrib? -
i'm working xunitcontrib codeplex page , toward bottom lists these steps
for windows phone 7 follow along this blog post create windows phone application add references to:
- microsoft.silverlight.testing.dll (silverlight 3 version - included in release)
- xunit-silverlight-wp7
- xunit.extensions-silverlight-wp7
- xunitcontrib.runner.silverlight.toolkit-wp7
visual studio may display warnings including silverlight 3 assemblies. ignore it, these right files
add [fact] based tests , run app (note- blog post mentioned isn't using fact based tests i'm more confused ...)
but after add above mentioned dll's , start below ... resharper , can't seem hookup testing harness enough compile. has wired unit test xunit wp7?
public class myfirstwp7test { [fact] public void can_run_test_for_wp7() { var x = "hello world"; assert.equal("hello world", x); } }
you can't use resharper run silverlight or windows phone tests, unfortunately. xunitcontrib resharper runner desktop clr (newer builds ignore files in silverlight/wp project don't see unit test marker in editor).
you need deploy device or emulator, run application , drive tests through ui of silverlight unit testing framework. can filter tag, test class or test method name, has in phone's environment.
Comments
Post a Comment