public static void Unirest_Should_Return_Correct_URL() { Assert.Equal("http://localhost", Unirest.get("http://localhost").URL.OriginalString); Assert.Equal("http://localhost", Unirest.post("http://localhost").URL.OriginalString); Assert.Equal("http://localhost", Unirest.delete("http://localhost").URL.OriginalString); Assert.Equal("http://localhost", Unirest.patch("http://localhost").URL.OriginalString); Assert.Equal("http://localhost", Unirest.put("http://localhost").URL.OriginalString); }
public void Unirest_Should_Return_Correct_URL() { Unirest.get("http://localhost").URL.OriginalString.Should().Be("http://localhost"); Unirest.post("http://localhost").URL.OriginalString.Should().Be("http://localhost"); Unirest.delete("http://localhost").URL.OriginalString.Should().Be("http://localhost"); Unirest.patch("http://localhost").URL.OriginalString.Should().Be("http://localhost"); Unirest.put("http://localhost").URL.OriginalString.Should().Be("http://localhost"); }
public static void Unirest_Should_Return_Correct_Verb() { Assert.Equal(HttpMethod.Get, Unirest.get("http://localhost").HttpMethod); Assert.Equal(HttpMethod.Post, Unirest.post("http://localhost").HttpMethod); Assert.Equal(HttpMethod.Delete, Unirest.delete("http://localhost").HttpMethod); Assert.Equal(new HttpMethod("PATCH"), Unirest.patch("http://localhost").HttpMethod); Assert.Equal(HttpMethod.Put, Unirest.put("http://localhost").HttpMethod); }
public void Unirest_Should_Return_Correct_Verb() { Unirest.get("http://localhost").HttpMethod.Should().Be(HttpMethod.Get); Unirest.post("http://localhost").HttpMethod.Should().Be(HttpMethod.Post); Unirest.delete("http://localhost").HttpMethod.Should().Be(HttpMethod.Delete); Unirest.patch("http://localhost").HttpMethod.Should().Be(new HttpMethod("PATCH")); Unirest.put("http://localhost").HttpMethod.Should().Be(HttpMethod.Put); }
public static HttpRequest Patch(string url, long timeout = 30) { return(Unirest.patch(Config.ServerUrl + url, timeout).AddRTCHead()); }