Open Source Web Application Framework for ASP.NET Core
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20 lines
493 B

using System;
using Microsoft.Extensions.DependencyInjection;
namespace Volo.Abp.TestBase
{
public abstract class AbpTestBaseWithServiceProvider
{
protected abstract IServiceProvider ServiceProvider { get; }
protected virtual T GetService<T>()
{
return ServiceProvider.GetService<T>();
}
protected virtual T GetRequiredService<T>()
{
return ServiceProvider.GetRequiredService<T>();
}
}
}