added failing test

This commit is contained in:
Brendan Forster
2014-07-07 19:39:18 +09:30
parent b213fb0dcb
commit 5d3d4e7c35
@@ -80,6 +80,47 @@ namespace Octokit.Tests
Assert.True(sample.Private);
}
[Fact]
public void CanDeserializeOrganization()
{
const string json = "{" +
"\"login\": \"mono\"," +
"\"id\": 53395," +
"\"avatar_url\": \"https://avatars.githubusercontent.com/u/53395?\"," +
"\"gravatar_id\": \"f275a99c0b4e6044d3e81daf445f8174\"," +
"\"url\": \"https://api.github.com/users/mono\"," +
"\"html_url\": \"https://github.com/mono\"," +
"\"followers_url\": \"https://api.github.com/users/mono/followers\"," +
"\"following_url\": \"https://api.github.com/users/mono/following{/other_user}\"," +
"\"gists_url\": \"https://api.github.com/users/mono/gists{/gist_id}\"," +
"\"starred_url\": \"https://api.github.com/users/mono/starred{/owner}{/repo}\"," +
"\"subscriptions_url\": \"https://api.github.com/users/mono/subscriptions\"," +
"\"organizations_url\": \"https://api.github.com/users/mono/orgs\"," +
"\"repos_url\": \"https://api.github.com/users/mono/repos\"," +
"\"events_url\": \"https://api.github.com/users/mono/events{/privacy}\"," +
"\"received_events_url\": \"https://api.github.com/users/mono/received_events\"," +
"\"type\": \"Organization\"," +
"\"site_admin\": false," +
"\"name\": \"Mono Project\"," +
"\"company\": null," +
"\"blog\": \"http://mono-project.com\"," +
"\"location\": \"Boston, MA\"," +
"\"email\": \"mono@xamarin.com\"," +
"\"hireable\": null," +
"\"bio\": null," +
"\"public_repos\": 161," +
"\"public_gists\": 0," +
"\"followers\": 0," +
"\"following\": 0," +
"\"created_at\": \"2009-02-10T17:53:17Z\"," +
"\"updated_at\": \"2014-07-07T00:12:56Z\"" +
"}";
var result = new SimpleJsonSerializer().Deserialize<User>(json);
Assert.Equal("Mono Project", result.Name);
}
[Fact]
public void DeserializesInheritedProperties()
{