public Task<Tag> Get(string tagName) { var parameters = new List<Parameter> { new Parameter { Name = "name", Value = tagName, Type = ParameterType.UrlSegment } }; return _connection.ExecuteRequest<Tag>("tags/{name}", parameters, null, "tag"); }
public void CorrectRequestForGet() { var factory = Substitute.For<IConnection>(); var client = new TagsClient(factory); client.Get("notarealtag"); var parameters = Arg.Is<List<Parameter>>(list => (string)list[0].Value == "notarealtag"); factory.Received().ExecuteRequest<Tag>("tags/{name}", parameters, null, "tag"); }