public TResponse GetResponseFor <TResponse>(RequestBase request) { var requestString = string.Format("https://{0}/{1}/{2}/?{3}", server, apiName, request.GetPath(), request.GetParametersLikeUri()); var webClient = new WebClient(); var responseString = webClient.DownloadString(requestString); var response = serializer.Deserialize <TResponse>(responseString); return(response); }
public void GetParametersLikeUri_RequiredParametersNotSetted_InvalidOperationException() { var request = new RequestBase(); Assert.Throws <InvalidOperationException>(() => request.GetParametersLikeUri()); }