Initialize Files

Initialize Files to reduce needless setup to create a gist.
This commit is contained in:
Robert Mills
2013-11-28 17:50:14 -05:00
committed by Marius Ungureanu
parent 616ac3b425
commit 9d6345d0ea
2 changed files with 7 additions and 4 deletions
+1 -4
View File
@@ -33,10 +33,7 @@ public class GistsClientTests
newGist.Description = "my new gist";
newGist.Public = true;
var gistFiles = new Dictionary<string, string>();
gistFiles.Add("myGistTestFile.cs", "new GistsClient(connection).Create();");
newGist.Files = gistFiles;
newGist.Files.Add("myGistTestFile.cs", "new GistsClient(connection).Create();");
client.Create(newGist);
+6
View File
@@ -1,9 +1,15 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
namespace Octokit
{
public class NewGist
{
public NewGist()
{
Files = new Dictionary<string, string>();
}
/// <summary>
/// The description of the gist.
/// </summary>