mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-05-29 17:32:44 +00:00
Fixed moar failing tests
This commit is contained in:
@@ -83,12 +83,7 @@ public class TagsClientTests
|
||||
Tag = "tag-name",
|
||||
Object = "tag-object",
|
||||
Type = TaggedType.Tree,
|
||||
Tagger = new SignatureResponse
|
||||
{
|
||||
Name = "tagger-name",
|
||||
Email = "tagger-email",
|
||||
Date = DateTimeOffset.Parse("2013-09-03T13:42:52Z")
|
||||
}
|
||||
Tagger = new SignatureResponse("tagger-name", "tagger-email", DateTimeOffset.Parse("2013-09-03T13:42:52Z"))
|
||||
};
|
||||
|
||||
var json = new SimpleJsonSerializer().Serialize(tag);
|
||||
|
||||
@@ -11,32 +11,32 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// The GitHub global public timeline
|
||||
/// </summary>
|
||||
public FeedLink Timeline { get; set; }
|
||||
public FeedLink Timeline { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The public timeline for any user, using URI template
|
||||
/// </summary>
|
||||
public FeedLink User { get; set; }
|
||||
public FeedLink User { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The public timeline for the authenticated user
|
||||
/// </summary>
|
||||
public FeedLink CurrentUserPublic { get; set; }
|
||||
public FeedLink CurrentUserPublic { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The private timeline for the authenticated user
|
||||
/// </summary>
|
||||
public FeedLink CurrentUser { get; set; }
|
||||
public FeedLink CurrentUser { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The private timeline for activity created by the authenticated user
|
||||
/// </summary>
|
||||
public FeedLink CurrentUserActor { get; set; }
|
||||
public FeedLink CurrentUserActor { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The private timeline for the authenticated user for a given organization, using URI template
|
||||
/// </summary>
|
||||
public FeedLink CurrentUserOrganization { get; set; }
|
||||
public FeedLink CurrentUserOrganization { get; protected set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -47,12 +47,12 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Link to feed
|
||||
/// </summary>
|
||||
public string Href { get; set; }
|
||||
public string Href { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Feed type, e.g. application/atom+xml
|
||||
/// </summary>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods")]
|
||||
public string Type { get; set; }
|
||||
public string Type { get; protected set; }
|
||||
}
|
||||
}
|
||||
@@ -13,24 +13,21 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// The number of additions made within the commit
|
||||
/// </summary>
|
||||
public int Additions { get; set; }
|
||||
public int Additions { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of deletions made within the commit
|
||||
/// </summary>
|
||||
public int Deletions { get; set; }
|
||||
public int Deletions { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The total number of modifications within the commit
|
||||
/// </summary>
|
||||
public int Total { get; set; }
|
||||
public int Total { get; protected set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Stats: +{0} -{1} ={2}", Additions, Deletions, Total);
|
||||
}
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "Stats: +{0} -{1} ={2}", Additions, Deletions, Total); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,11 +4,14 @@ namespace Octokit
|
||||
{
|
||||
public class NotificationInfo
|
||||
{
|
||||
public string Title { get; set; }
|
||||
public string Url { get; set; }
|
||||
public string LatestCommentUrl { get; set; }
|
||||
public string Title { get; protected set; }
|
||||
|
||||
public string Url { get; protected set; }
|
||||
|
||||
public string LatestCommentUrl { get; protected set; }
|
||||
|
||||
[SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods",
|
||||
Justification = "Matches the property name used by the API")]
|
||||
public string Type { get; set; }
|
||||
public string Type { get; protected set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,28 +9,28 @@ namespace Octokit
|
||||
/// The number of collaborators allowed with this plan.
|
||||
/// </summary>
|
||||
/// <remarks>This returns <see cref="long"/> because GitHub Enterprise uses a sentinel value of 999999999999 to denote an "unlimited" number of collaborators.</remarks>
|
||||
public long Collaborators { get; set; }
|
||||
public long Collaborators { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The name of the plan.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
public string Name { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The number of private repositories allowed with this plan.
|
||||
/// </summary>
|
||||
/// <remarks>This returns <see cref="long"/> because GitHub Enterprise uses a sentinel value of 999999999999 to denote an "unlimited" number of plans.</remarks>
|
||||
public long PrivateRepos { get; set; }
|
||||
public long PrivateRepos { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The amount of disk space allowed with this plan.
|
||||
/// </summary>
|
||||
/// <remarks>This returns <see cref="long"/> because GitHub Enterprise uses a sentinel value of 999999999999 to denote an "unlimited" amount of disk space.</remarks>
|
||||
public long Space { get; set; }
|
||||
public long Space { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// The billing email for the organization. Only has a value in response to editing an organization.
|
||||
/// </summary>
|
||||
public string BillingEmail { get; set; }
|
||||
public string BillingEmail { get; protected set; }
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Octokit
|
||||
@@ -11,25 +10,21 @@ namespace Octokit
|
||||
/// <summary>
|
||||
/// Whether the current user has administrative permissions
|
||||
/// </summary>
|
||||
public bool Admin { get; set; }
|
||||
public bool Admin { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the current user has push permissions
|
||||
/// </summary>
|
||||
public bool Push { get; set; }
|
||||
public bool Push { get; protected set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the current user has pull permissions
|
||||
/// </summary>
|
||||
public bool Pull { get; set; }
|
||||
|
||||
public bool Pull { get; protected set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Admin: {0}, Push: {1}, Pull: {2}", Admin, Push, Pull);
|
||||
}
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "Admin: {0}, Push: {1}, Pull: {2}", Admin, Push, Pull); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,16 +7,26 @@ namespace Octokit
|
||||
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
||||
public class SignatureResponse
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Email { get; set; }
|
||||
public DateTimeOffset Date { get; set; }
|
||||
public SignatureResponse()
|
||||
{
|
||||
}
|
||||
|
||||
public SignatureResponse(string name, string email, DateTimeOffset date)
|
||||
{
|
||||
Name = name;
|
||||
Email = email;
|
||||
Date = date;
|
||||
}
|
||||
|
||||
public string Name { get; protected set; }
|
||||
|
||||
public string Email { get; protected set; }
|
||||
|
||||
public DateTimeOffset Date { get; protected set; }
|
||||
|
||||
internal string DebuggerDisplay
|
||||
{
|
||||
get
|
||||
{
|
||||
return String.Format(CultureInfo.InvariantCulture, "Name: {0} Email: {1} Date: {2}", Name, Email, Date);
|
||||
}
|
||||
get { return String.Format(CultureInfo.InvariantCulture, "Name: {0} Email: {1} Date: {2}", Name, Email, Date); }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1721:PropertyNamesShouldNotMatchGetMethods",
|
||||
Justification = "Name defined by web api and required for deserialisation")]
|
||||
public TaggedType Type { get; set; }
|
||||
public TaggedType Type { get; protected set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user