public void TestDeleteBranch() { RestRequest GetRequest = RequestFactory.BranchRequest(_requestUrlDeleteBranch, Method.DELETE, _projectId, _newBranch); IRestResponse RestResponse = Client.Execute(GetRequest); string statusCode = RestResponse.StatusCode.ToString(); AssertService.AreEqual(StatusCode.NoContent.ToString(), statusCode.ToString()); }
public void TestCreateNewBrunch() { RestRequest GetRequest = RequestFactory.BranchRequest(_requestUrlBranch, Method.POST, _projectId, _newBranch); GetRequest.AddUrlSegment("branch", _branch); IRestResponse RestResponse = Client.Execute(GetRequest); string statusCode = RestResponse.StatusCode.ToString(); AssertService.AreEqual(StatusCode.Created.ToString(), statusCode); }
public static RestRequest GetRequestFactory(string requestType, string branchName) { switch (requestType) { case "AddBranch": return(_restRequest = RequestFactory.BranchRequest(_requestUrlBranch, Method.POST, _projectId, branchName)); case "DeleteBranch": return(_restRequest = RequestFactory.BranchRequest(_requestUrlDeleteBranch, Method.DELETE, _projectId, branchName)); } return(null); }