mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-03 19:11:30 +00:00
allow deserialization of IReadOnlyCollection<T>
This commit is contained in:
@@ -102,6 +102,7 @@ public class UsersClientTests
|
||||
|
||||
public class TheGetEmailsMethod
|
||||
{
|
||||
[IntegrationTest]
|
||||
public async Task RetrievesEmailsForUser()
|
||||
{
|
||||
var github = new GitHubClient(new ProductHeaderValue("OctokitTests"))
|
||||
@@ -111,10 +112,10 @@ public class UsersClientTests
|
||||
|
||||
var emails = await github.User.GetEmails();
|
||||
|
||||
Assert.Equal(1, emails.Count());
|
||||
Assert.Equal("test-octowin@example.com", emails.First().Email);
|
||||
Assert.True(emails.First().Primary);
|
||||
Assert.False(emails.First().Verified);
|
||||
Assert.NotEmpty(emails);
|
||||
var email = emails.First();
|
||||
Assert.True(email.Primary);
|
||||
Assert.False(email.Verified);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1638,7 +1638,7 @@ namespace Octokit
|
||||
|
||||
Type genericDefinition = type.GetGenericTypeDefinition();
|
||||
|
||||
return (genericDefinition == typeof(IList<>) || genericDefinition == typeof(ICollection<>) || genericDefinition == typeof(IEnumerable<>));
|
||||
return genericDefinition == typeof(IList<>) || genericDefinition == typeof(ICollection<>) || genericDefinition == typeof(IEnumerable<>) || genericDefinition == typeof(IReadOnlyCollection<>);
|
||||
}
|
||||
|
||||
public static bool IsAssignableFrom(Type type1, Type type2)
|
||||
|
||||
Reference in New Issue
Block a user