Skip to content

Commit

Permalink
Merge branch 'master' into hahmed/search-api
Browse files Browse the repository at this point in the history
  • Loading branch information
hahmed committed Dec 20, 2013
2 parents c7f4617 + 1d37e01 commit 3a85248
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 6 deletions.
20 changes: 20 additions & 0 deletions Octokit.Tests.Integration/Clients/EventsClientTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Net.Http.Headers;
using System.Threading.Tasks;
using Xunit;

namespace Octokit.Tests.Integration.Clients
{
public class EventsClientTests
{
public class TheGetUserPerformedMethod
{
[Fact]
public async Task ReturnsACollection()
{
var github = new GitHubClient(new ProductHeaderValue("MyApp"));
var events = await github.Activity.Events.GetUserPerformed("shiftkey");
Assert.NotEmpty(events);
}
}
}
}
4 changes: 4 additions & 0 deletions Octokit.Tests.Integration/Octokit.Tests.Integration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@
<Compile Include="Clients\BlobClientTests.cs" />
<Compile Include="Clients\CommitsClientTests.cs" />
<Compile Include="Clients\CommitStatusClientTests.cs" />
<Compile Include="Clients\EventsClientTests.cs" />
<Compile Include="Clients\IssuesLabelsClientTests.cs" />
<Compile Include="Clients\GistsClientTests.cs" />
<Compile Include="Clients\IssuesEventsClientTests.cs" />
Expand Down Expand Up @@ -98,6 +99,9 @@
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
5 changes: 2 additions & 3 deletions Octokit.Tests/Clients/IssueCommentsClientTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public void PostsToCorrectUrl()

client.Create("fake", "repo", 1, newComment);

connection.Received().Post<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/1/comments"), newComment);
connection.Received().Post<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/1/comments"), Arg.Any<object>());
}

[Fact]
Expand Down Expand Up @@ -126,8 +126,7 @@ public void PostsToCorrectUrl()

client.Update("fake", "repo", 42, issueCommentUpdate);

connection.Received().Patch<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/comments/42"),
issueCommentUpdate);
connection.Received().Patch<IssueComment>(Arg.Is<Uri>(u => u.ToString() == "repos/fake/repo/issues/comments/42"), Arg.Any<object>());
}

[Fact]
Expand Down
3 changes: 3 additions & 0 deletions Octokit.Tests/OctoKit.Tests-NetCore45.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@
<Name>Octokit-NetCore45</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
3 changes: 3 additions & 0 deletions Octokit.Tests/Octokit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@
<None Include="packages.config" />
<EmbeddedResource Include="Fixtures\user.json" />
</ItemGroup>
<ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
Expand Down
4 changes: 2 additions & 2 deletions Octokit/Clients/IssueCommentsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public Task<IssueComment> Create(string owner, string name, int number, string n
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(newComment, "newComment");

return ApiConnection.Post<IssueComment>(ApiUrls.IssueComments(owner, name, number), newComment);
return ApiConnection.Post<IssueComment>(ApiUrls.IssueComments(owner, name, number), new BodyWrapper(newComment));
}

/// <summary>
Expand All @@ -100,7 +100,7 @@ public Task<IssueComment> Update(string owner, string name, int number, string c
Ensure.ArgumentNotNullOrEmptyString(name, "name");
Ensure.ArgumentNotNull(commentUpdate, "commentUpdate");

return ApiConnection.Patch<IssueComment>(ApiUrls.IssueComment(owner, name, number), commentUpdate);
return ApiConnection.Patch<IssueComment>(ApiUrls.IssueComment(owner, name, number), new BodyWrapper(commentUpdate));
}
}
}
2 changes: 1 addition & 1 deletion Octokit/Models/Response/Activity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@ public class Activity
/// <summary>
/// The activity event Id.
/// </summary>
public int Id { get; set; }
public string Id { get; set; }
}
}

0 comments on commit 3a85248

Please sign in to comment.