28
Vote

Add support for returning Task and Task<T> in UnitTests

description

WPF now finally has support for asynchronous unit tests by returning a Task.In the interest of sharing source code and programming patterns, it would be nice if the Silverlight Unit Test Framework used in both WP and SL supported the same pattern. Ie so instead of marking async classes with [Asynchronous] and calling base.TestComplete, the core framework detects that the test method returns Task and does these things for you. At the same time you wouldn't have to inherit from "SilverlightTest" either.I know you could use TaskCompletionSource and write this all up yourself in the test, but that defeats the purpose of having a common way for performing async tests and for those of us that share code across platforms to execute the unittests on all these platforms.I know you don't take contributions for toolkit, but in case anyone else is interested I hacked this into the framework and blogged about it here: http://www.sharpgis.net/post/2012/12/21/Hacking-the-Silverlight-Unit-Tests-to-support-returning-Task.aspx

comments