Update() public method

Update the name of a Tag
public Update ( string tagName, string newTagName ) : Task
tagName string
newTagName string
return Task
Exemplo n.º 1
0
        public void CorrectRequestForUpdate() {
            var factory = Substitute.For<IConnection>();
            var client = new TagsClient(factory);

            client.Update("notarealtag", "notarealtag2");

            var parameters = Arg.Is<List<Parameter>>(list => (string)list[0].Value == "notarealtag");
            factory.Received().ExecuteRequest<Tag>("tags/{name}", parameters, Arg.Is<Models.Requests.Tag>(data => data.Name == "notarealtag2"), "tag", Method.PUT);
        }