Last active
March 20, 2017 14:39
-
-
Save phil-scott-78/81988219feb2e6b72fe9a3b2b3abde5e to your computer and use it in GitHub Desktop.
Resharper fails to run classes with async methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading.Tasks; | |
using Xunit; | |
namespace XUnitTestProject1 | |
{ | |
public class Works | |
{ | |
[Fact] | |
public void Test1() | |
{ | |
Assert.Equal(4, 2 + 2); | |
} | |
} | |
public class DoesntWork | |
{ | |
[Fact] | |
public void Test1() | |
{ | |
// even though this isn't async all it takes is a test that is async | |
// to bork up the whole fixture | |
Assert.Equal(4, 2 + 2); | |
} | |
[Fact] | |
public async Task Test2() | |
{ | |
Assert.Equal(4, 2 + 2); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment