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 namespace Kyoo.Tests
{ {
public abstract class RepositoryTests<T> public abstract class RepositoryTests<T> : IDisposable, IAsyncDisposable
where T : class, IResource, new() where T : class, IResource, new()
{ {
protected readonly RepositoryActivator Repositories; protected readonly RepositoryActivator Repositories;
@ -22,6 +22,16 @@ namespace Kyoo.Tests
_repository = Repositories.LibraryManager.GetRepository<T>(); _repository = Repositories.LibraryManager.GetRepository<T>();
} }
public void Dispose()
{
Repositories.Dispose();
}
public ValueTask DisposeAsync()
{
return Repositories.DisposeAsync();
}
[Fact] [Fact]
public async Task FillTest() public async Task FillTest()
{ {