You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
620 B
C#
28 lines
620 B
C#
2 years ago
|
namespace ElasticSearchStudy.UseHttpAPI
|
||
|
{
|
||
|
public class UseXUnitTest
|
||
|
{
|
||
|
[Fact]
|
||
|
public void Test1()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
[Fact]
|
||
|
public void Test2()
|
||
|
{
|
||
|
RestClientOptions clientOptions = new RestClientOptions()
|
||
|
{
|
||
|
BaseUrl=new Uri("http://www.baidu.com"),
|
||
|
};
|
||
|
RestClient client = new RestClient(clientOptions);
|
||
|
|
||
|
RestRequest request = new RestRequest("", Method.Get);
|
||
|
|
||
|
|
||
|
var response = client.Get(request);
|
||
|
|
||
|
Assert.True(response.IsSuccessStatusCode);
|
||
|
}
|
||
|
}
|
||
|
}
|