- Fork this repository
- Make all test cases pass
- .Net Core 7.0
- Visual Studio
Custom TestServer:
protected HttpClient GetClient(ArticleRepository articleRepository, UserRepository userRepository)
{
return Factory.WithWebHostBuilder(builder =>
{
builder.ConfigureServices(
services =>
{
services.AddSingleton<ArticleRepository>(provider =>
{
return articleRepository;
});
services.AddSingleton<UserRepository>(provider =>
{
return userRepository;
});
});
}).CreateDefaultClient();
}