public MyResource CreateResource(MyResourceCreate body) { var urlParams = new Dictionary <string, object> { }; var url = this.InterpolatePath("/my_resources", urlParams); return(MakeRequest <MyResource>(Method.POST, url, body, null)); }
public void CanProperlyCreateAResource() { var client = MockClient.Build(SuccessResponse(System.Net.HttpStatusCode.Created)); var request = new MyResourceCreate() { MyString = "benjamin" }; MyResource resource = client.CreateResource(request); Assert.Equal("benjamin", resource.MyString); }
public void CanProperlyCreateAResource() { var client = this.CreateResourceSuccessClient(); var request = new MyResourceCreate() { MyString = "benjamin" }; MyResource resource = client.CreateResource(request); Assert.Equal("benjamin", resource.MyString); }