mirror of
https://github.com/zoriya/octokit.net.git
synced 2026-06-09 13:01:36 +00:00
Added missing methods on IRepositoriesClient
Added unit tests for newly added methods Added models RepositoryTag, RepositoryLanguage and RepositoryUpdate
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
using Octokit.Internal;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Xunit;
|
||||
|
||||
namespace Octokit.Tests.Models
|
||||
{
|
||||
public class RepositoryUpdateTests
|
||||
{
|
||||
[Fact]
|
||||
public void CanSerialize()
|
||||
{
|
||||
var expected = "{\"name\":\"Hello-World\"," +
|
||||
"\"description\":\"This is your first repository\"," +
|
||||
"\"homepage\":\"https://github.com\"," +
|
||||
"\"private\":true," +
|
||||
"\"has_issues\":true," +
|
||||
"\"has_wiki\":true," +
|
||||
"\"has_downloads\":true}";
|
||||
|
||||
var update = new RepositoryUpdate
|
||||
{
|
||||
Name = "Hello-World",
|
||||
Description = "This is your first repository",
|
||||
Homepage = "https://github.com",
|
||||
Private = true,
|
||||
HasIssues = true,
|
||||
HasWiki = true,
|
||||
HasDownloads = true
|
||||
};
|
||||
|
||||
var json = new SimpleJsonSerializer().Serialize(update);
|
||||
|
||||
Assert.Equal(expected, json);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user