diff --git a/Octokit.Tests/Clients/GistsClientTests.cs b/Octokit.Tests/Clients/GistsClientTests.cs index 4e89758b..2554b95e 100644 --- a/Octokit.Tests/Clients/GistsClientTests.cs +++ b/Octokit.Tests/Clients/GistsClientTests.cs @@ -33,10 +33,7 @@ public class GistsClientTests newGist.Description = "my new gist"; newGist.Public = true; - var gistFiles = new Dictionary(); - gistFiles.Add("myGistTestFile.cs", "new GistsClient(connection).Create();"); - - newGist.Files = gistFiles; + newGist.Files.Add("myGistTestFile.cs", "new GistsClient(connection).Create();"); client.Create(newGist); diff --git a/Octokit/Models/Request/NewGist.cs b/Octokit/Models/Request/NewGist.cs index bef676ed..9bdd6d35 100644 --- a/Octokit/Models/Request/NewGist.cs +++ b/Octokit/Models/Request/NewGist.cs @@ -1,9 +1,15 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; + namespace Octokit { public class NewGist { + public NewGist() + { + Files = new Dictionary(); + } + /// /// The description of the gist. ///