[skip ci] Fix unit tests on macOS (And probably Unix) (#3647)
This commit is contained in:
parent
e897fb9a12
commit
98a2b9d3ed
12 changed files with 154 additions and 172 deletions
|
@ -32,18 +32,13 @@ using Xunit.Abstractions;
|
|||
|
||||
namespace API.Tests.Services;
|
||||
|
||||
public class ReaderServiceTests
|
||||
public class ReaderServiceTests: AbstractFsTest
|
||||
{
|
||||
private readonly ITestOutputHelper _testOutputHelper;
|
||||
private readonly IUnitOfWork _unitOfWork;
|
||||
private readonly DataContext _context;
|
||||
private readonly ReaderService _readerService;
|
||||
|
||||
private const string CacheDirectory = "C:/kavita/config/cache/";
|
||||
private const string CoverImageDirectory = "C:/kavita/config/covers/";
|
||||
private const string BackupDirectory = "C:/kavita/config/backups/";
|
||||
private const string DataDirectory = "C:/data/";
|
||||
|
||||
public ReaderServiceTests(ITestOutputHelper testOutputHelper)
|
||||
{
|
||||
_testOutputHelper = testOutputHelper;
|
||||
|
@ -101,19 +96,6 @@ public class ReaderServiceTests
|
|||
await _context.SaveChangesAsync();
|
||||
}
|
||||
|
||||
private static MockFileSystem CreateFileSystem()
|
||||
{
|
||||
var fileSystem = new MockFileSystem();
|
||||
fileSystem.Directory.SetCurrentDirectory("C:/kavita/");
|
||||
fileSystem.AddDirectory("C:/kavita/config/");
|
||||
fileSystem.AddDirectory(CacheDirectory);
|
||||
fileSystem.AddDirectory(CoverImageDirectory);
|
||||
fileSystem.AddDirectory(BackupDirectory);
|
||||
fileSystem.AddDirectory(DataDirectory);
|
||||
|
||||
return fileSystem;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region FormatBookmarkFolderPath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue