Skip to content

Instantly share code, notes, and snippets.

@phil-scott-78
Last active March 20, 2017 14:39
Show Gist options
  • Save phil-scott-78/81988219feb2e6b72fe9a3b2b3abde5e to your computer and use it in GitHub Desktop.
Save phil-scott-78/81988219feb2e6b72fe9a3b2b3abde5e to your computer and use it in GitHub Desktop.
Resharper fails to run classes with async methods
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