标签: c# asp.net unit-testing asp.net-core
[TestClass] public class HomeControllerTests { public HomeControllerTests(IStringLocalizer<HomeController> localizer) { } }
在上面的类中测试HomeController,我想得到StringLocalizer,它用于创建HomeController的实例。如何通过DI获得它?