Fixed moar failing tests

This commit is contained in:
Kristian Hellang
2015-01-06 00:51:36 +01:00
parent 8cdf53d878
commit cb4f056a86
8 changed files with 49 additions and 49 deletions
+1 -6
View File
@@ -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);
+8 -8
View File
@@ -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; }
}
}
+4 -7
View File
@@ -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); }
}
}
}
+7 -4
View File
@@ -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; }
}
}
+5 -5
View File
@@ -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); }
}
}
}
}
+18 -8
View File
@@ -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); }
}
}
}
}
+1 -1
View File
@@ -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>