Created
July 4, 2015 00:30
-
-
Save mattjohnsonpint/0a21d5640f65ddcbf930 to your computer and use it in GitHub Desktop.
xUnit / Json issue
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 Newtonsoft.Json; | |
using Xunit; | |
using Xunit.Abstractions; | |
namespace XUnitJsonTest | |
{ | |
public class Class1 | |
{ | |
private readonly ITestOutputHelper _output; | |
public Class1(ITestOutputHelper output) | |
{ | |
_output = output; | |
} | |
[Fact] | |
public void Test1() | |
{ | |
var foo = new { Foo = "Bar" }; | |
var json = JsonConvert.SerializeObject(foo); | |
_output.WriteLine(json); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment