AsyncFixer
AsyncFixer copied to clipboard
Code is sometimes mangled if it is a sync call that is supplying a method argument
Consider this:
Assert.AreEqual(1, dbContext.Person.Count());
AF raises 02 for this and suggests CountAsync(), but asking VS to make the change results in:
await Assert.AreEqualAsync(1, dbContext.Person.Count());
rather than
Assert.AreEqual(1, await dbContext.Person.CountAsync());