Created
November 9, 2016 04:05
-
-
Save jmkelly/09d9c7613d407fd9b67877be4fa61815 to your computer and use it in GitHub Desktop.
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 Shouldly; | |
using Xunit; | |
namespace ClassLibrary9 | |
{ | |
public class Sample | |
{ | |
public async Task DoSomething() | |
{ | |
throw new Exception("test"); | |
} | |
} | |
public class TestFixture | |
{ | |
[Fact] | |
public void ShouldThrow() | |
{ | |
var sample = new Sample(); | |
var exception = Should.ThrowAsync<Exception>(() => sample.DoSomething()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment