/// <summary> /// To update a subset of information about a VPC. /// Currently, only the name and description attributes can be updated. /// </summary> public Task <Vpc> PartialUpdate(string vpcId, Models.Requests.UpdateVpc updateVpc) { var parameters = new List <Parameter> { new Parameter("id", vpcId, ParameterType.UrlSegment) }; return(_connection.ExecuteRequest <Vpc>("vpcs/{id}", parameters, updateVpc, "vpc", Method.PATCH)); }
public void CorrectRequestForPartialUpdate() { var factory = Substitute.For<IConnection>(); var client = new VpcClient(factory); var body = new Models.Requests.UpdateVpc(); client.PartialUpdate("abcdefg", body); var parameters = Arg.Is<List<Parameter>>(list => (string)list[0].Value == "abcdefg"); factory.Received().ExecuteRequest<Vpc>("vpcs/{id}", parameters, body, "vpc", Method.PATCH); }