mirror of
https://github.com/real-zony/ZonyLrcToolsX.git
synced 2025-09-01 02:16:52 +00:00
feat: 测试基类添加单独得 GetService<TService>() 方法。
This commit is contained in:
@@ -28,5 +28,10 @@ namespace ZonyLrcTools.Tests
|
||||
}
|
||||
|
||||
protected virtual void BuildServiceProvider() => ServiceProvider = ServiceCollection.BuildServiceProvider();
|
||||
|
||||
protected TService GetService<TService>()
|
||||
{
|
||||
return ServiceProvider.GetRequiredService<TService>();
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user