2019-01-21 17:33:20 +08:00
|
|
|
|
using System.Net.Http;
|
|
|
|
|
using Xunit;
|
|
|
|
|
|
|
|
|
|
namespace Bootstrap.Admin
|
|
|
|
|
{
|
2019-01-24 17:58:06 +08:00
|
|
|
|
[Collection("SQLServerContext")]
|
2019-01-21 17:33:20 +08:00
|
|
|
|
public class ControllerTest
|
|
|
|
|
{
|
|
|
|
|
protected HttpClient Client { get; set; }
|
|
|
|
|
|
|
|
|
|
protected BAWebHost Host { get; set; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="factory"></param>
|
|
|
|
|
/// <param name="baseAddress"></param>
|
|
|
|
|
public ControllerTest(BAWebHost factory, string baseAddress = "api")
|
|
|
|
|
{
|
|
|
|
|
Host = factory;
|
|
|
|
|
Client = factory.CreateClient(baseAddress);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|