Fixing database removal

This commit is contained in:
Zoe Roux 2021-06-16 23:24:21 +02:00
parent 7bd78bfaac
commit b8d4a2ed33

View File

@ -10,7 +10,7 @@ using Xunit;
namespace Kyoo.Tests
{
public abstract class RepositoryTests<T>
public abstract class RepositoryTests<T> : IDisposable, IAsyncDisposable
where T : class, IResource, new()
{
protected readonly RepositoryActivator Repositories;
@ -21,7 +21,17 @@ namespace Kyoo.Tests
Repositories = repositories;
_repository = Repositories.LibraryManager.GetRepository<T>();
}
public void Dispose()
{
Repositories.Dispose();
}
public ValueTask DisposeAsync()
{
return Repositories.DisposeAsync();
}
[Fact]
public async Task FillTest()
{