Silverligh 5 + Microsoft.Async + await async unit tests

May 26, 2015 at 1:23 PM
Edited May 26, 2015 at 1:25 PM
Hi all,

We have implemented in our Silverlight projects the Microsoft.Async libraries to write code with the async await keywords.

We are trying to write unit tests as:
public async void Test1()
    await this.viewModel.LoadAsync();

    this.serviceMock.Verify(s => s.GetSomething());
Unfortunatelly the await line is not really waiting, It goes directly to the assertion so the test fails.

We have read in the thread Async+ExpectedException that:
AgUnit (StatLight actually) has no support for async. Your test needs to complete synchronously (or see below) so you'll need to await your calls to async methods.
So, here our questions:
  1. Is this still true?
  2. If not, is there any plan to bring support for async await to AgUnit?
  3. If we have to do it by ourselves, can we do it into the Statlight source code without affecting AgUnit?
  4. Can you provide some guidance on how to bring this feature in?
Thanks a lot