Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
Frequently Used Methods
public void CreatePost_MakesTheCorrectHttpRequests() { var post = SetupExamplePost(); var httpClient = new Mock <IHttpClient>(); httpClient.SetupRequest("http://localhost/", "api/v4/posts") .WithContentType(CONTENT_TYPE) .WithToken(TOKEN) .Post(post.SerializeToPayload()); var sut = new RestService(httpClient.Object); sut.CreatePost(Uri, TOKEN, post); httpClient.VerifyAll(); }