Firstly: Thanks for the great project and continued support. You're saving our project :)
I have one question though: I'd like to test exceptions on my ViewModels in Silverlight 5. I use the Async CTP, so the exception will occur in another Thread. This crashes the runner and sometimes even freezes up VS2013.
Is there a way to prevent this? I already tried to decorate my Test with [Asynchronous], but that won't help. Here's my code:
public void RemoveAssociationCommand_ExecutedWithNull_Throws()
var fixture = new Fixture();
var sut = fixture.CreateSut();
sut.RemoveAssociationCommand.Execute(null); // MvvmLight EventToCommand
The method behind RemoveAssociationCommand
is async, and this is where the expected exception gets thrown:
private async void Remove(ITextAutocomplete item)
if (item == null)
throw new ArgumentNullException("item");
The methods needs to be async, because in the standard case, various asynchronous services get called. The error I get is the following:
Is there a workaround for this?
Thanks in advance!