diff --git a/Octokit.Reactive/Clients/IObservableTreesClient.cs b/Octokit.Reactive/Clients/IObservableTreesClient.cs
new file mode 100644
index 00000000..e2c52e06
--- /dev/null
+++ b/Octokit.Reactive/Clients/IObservableTreesClient.cs
@@ -0,0 +1,32 @@
+using System;
+
+namespace Octokit.Reactive
+{
+ public interface IObservableTreesClient
+ {
+ ///
+ /// Gets a Tree Response for a given SHA.
+ ///
+ ///
+ /// http://developer.github.com/v3/git/trees/#get-a-tree
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The SHA that references the tree
+ /// The for the specified Tree.
+ [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Get")]
+ IObservable Get(string owner, string name, string reference);
+
+ ///
+ /// Creates a new Tree in the specified repo
+ ///
+ ///
+ /// http://developer.github.com/v3/git/trees/#create-a-tree
+ ///
+ /// The owner of the repository
+ /// The name of the repository
+ /// The value of the new tree
+ /// The that was just created.
+ IObservable Create(string owner, string name, NewTree newTree);
+ }
+}
\ No newline at end of file
diff --git a/Octokit.Reactive/Clients/ObservableTreesClient.cs b/Octokit.Reactive/Clients/ObservableTreesClient.cs
index 35c78479..2e3ba031 100644
--- a/Octokit.Reactive/Clients/ObservableTreesClient.cs
+++ b/Octokit.Reactive/Clients/ObservableTreesClient.cs
@@ -3,9 +3,6 @@ using System.Reactive.Threading.Tasks;
namespace Octokit.Reactive
{
- public interface IObservableTreesClient
- {
- }
public class ObservableTreesClient : IObservableTreesClient
{
diff --git a/Octokit.Reactive/Octokit.Reactive.csproj b/Octokit.Reactive/Octokit.Reactive.csproj
index be0f28b8..1c5ba26b 100644
--- a/Octokit.Reactive/Octokit.Reactive.csproj
+++ b/Octokit.Reactive/Octokit.Reactive.csproj
@@ -74,6 +74,7 @@
Properties\SolutionInfo.cs
+
diff --git a/Octokit.Tests/Octokit.Tests.csproj b/Octokit.Tests/Octokit.Tests.csproj
index 4070d36a..75bce2af 100644
--- a/Octokit.Tests/Octokit.Tests.csproj
+++ b/Octokit.Tests/Octokit.Tests.csproj
@@ -118,6 +118,7 @@
+
diff --git a/Octokit.Tests/Reactive/ObservableTreesClientTests.cs b/Octokit.Tests/Reactive/ObservableTreesClientTests.cs
new file mode 100644
index 00000000..b69f776e
--- /dev/null
+++ b/Octokit.Tests/Reactive/ObservableTreesClientTests.cs
@@ -0,0 +1,68 @@
+using System;
+using System.Reactive.Linq;
+using System.Threading.Tasks;
+using NSubstitute;
+using Octokit.Reactive;
+using Octokit.Tests.Helpers;
+using Xunit;
+
+namespace Octokit.Tests
+{
+ public class ObservableTreesClientTests
+ {
+ public class TheGetMethod
+ {
+ [Fact]
+ public void GetsFromClientIssueIssue()
+ {
+ var gitHubClient = Substitute.For();
+ var client = new ObservableTreesClient(gitHubClient);
+
+ client.Get("fake", "repo", "123456ABCD");
+
+ gitHubClient.Tree.Received().Get("fake", "repo", "123456ABCD");
+ }
+
+ [Fact]
+ public async Task EnsuresNonNullArguments()
+ {
+ var client = new ObservableTreesClient(Substitute.For());
+
+ await AssertEx.Throws(async () => await client.Get(null, "name", "123456ABCD"));
+ await AssertEx.Throws(async () => await client.Get("", "name", "123456ABCD"));
+ await AssertEx.Throws(async () => await client.Get("owner", null, "123456ABCD"));
+ await AssertEx.Throws(async () => await client.Get("owner", "", "123456ABCD"));
+ await AssertEx.Throws(async () => await client.Get("owner", "name", null));
+ await AssertEx.Throws(async () => await client.Get("owner", "name", ""));
+ }
+ }
+
+ public class TheCreateMethod
+ {
+ [Fact]
+ public void CreatesFromClientIssueIssue()
+ {
+ var newTree = new NewTree();
+ var gitHubClient = Substitute.For();
+ var client = new ObservableTreesClient(gitHubClient);
+
+ client.Create("fake", "repo", newTree);
+
+ gitHubClient.Tree.Received().Create("fake", "repo", newTree);
+ }
+
+ [Fact]
+ public async Task EnsuresArgumentsNotNull()
+ {
+ var gitHubClient = Substitute.For();
+ var client = new ObservableTreesClient(gitHubClient);
+
+ AssertEx.Throws(async () => await client.Create(null, "name", new NewTree()));
+ AssertEx.Throws(async () => await client.Create("", "name", new NewTree()));
+ AssertEx.Throws(async () => await client.Create("owner", null, new NewTree()));
+ AssertEx.Throws(async () => await client.Create("owner", "", new NewTree()));
+ AssertEx.Throws(async () => await client.Create("owner", "name", null));
+ }
+ }
+ }
+}