Exemple #1
0
 public void SetupHttpMockWithValidAssetUploadResponse(IHttpServer httpMock,
                                                       OctoSettingFixture octoSettingFixture)
 {
     httpMock.Stub(x => x.Post($"/repos/{octoSettingFixture.Owner}/{octoSettingFixture.Repository}/releases/{ReleaseId}/assets"))
     .AsContentType("application/json")
     .Return(GetUploadResponseJson)
     .WithStatus(HttpStatusCode.Created);
 }
Exemple #2
0
 public void SetupHttpMockWithValidResponseForReleaseRetrieval(IHttpServer httpMock,
                                                               OctoSettingFixture octoSettingFixture)
 {
     httpMock.Stub(x => x.Get($"/api/v3/repos/{octoSettingFixture.Owner}/{octoSettingFixture.Repository}/releases/{ReleaseId}"))
     .AsContentType("application/json")
     .Return(GetResponseJson)
     .OK();
 }
Exemple #3
0
 public void SetupHttpMockWithInvalidAssetUploadResponse(IHttpServer httpMock,
                                                         OctoSettingFixture octoSettingFixture)
 {
     httpMock.Stub(x => x.Post($"/repos/{octoSettingFixture.Owner}/{octoSettingFixture.Repository}/releases/{ReleaseId}/assets"))
     .WithStatus(HttpStatusCode.BadRequest);
 }