Some code cleanup
This commit is contained in:
parent
585e965a85
commit
d73bd22db2
34 changed files with 814 additions and 383 deletions
|
@ -67,15 +67,8 @@ namespace API.Tests.Services
|
|||
{
|
||||
var testDirectory = Path.Join(Directory.GetCurrentDirectory(), "../../../Services/Test Data/ArchiveService/Archives");
|
||||
var sw = Stopwatch.StartNew();
|
||||
try
|
||||
{
|
||||
Assert.Equal(expected, _archiveService.GetNumberOfPagesFromArchive(Path.Join(testDirectory, archivePath)));
|
||||
_testOutputHelper.WriteLine($"Processed Original in {sw.ElapsedMilliseconds} ms");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_testOutputHelper.WriteLine("Could not process");
|
||||
}
|
||||
Assert.Equal(expected, _archiveService.GetNumberOfPagesFromArchive(Path.Join(testDirectory, archivePath)));
|
||||
_testOutputHelper.WriteLine($"Processed Original in {sw.ElapsedMilliseconds} ms");
|
||||
}
|
||||
|
||||
|
||||
|
@ -95,15 +88,8 @@ namespace API.Tests.Services
|
|||
var sw = Stopwatch.StartNew();
|
||||
var testDirectory = Path.Join(Directory.GetCurrentDirectory(), "../../../Services/Test Data/ArchiveService/Archives");
|
||||
|
||||
try
|
||||
{
|
||||
Assert.Equal(expected, _archiveService.IsValidArchive(Path.Join(testDirectory, archivePath)));
|
||||
_testOutputHelper.WriteLine($"Processed Original in {sw.ElapsedMilliseconds} ms");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
_testOutputHelper.WriteLine("Could not process");
|
||||
}
|
||||
Assert.Equal(expected, _archiveService.IsValidArchive(Path.Join(testDirectory, archivePath)));
|
||||
_testOutputHelper.WriteLine($"Processed Original in {sw.ElapsedMilliseconds} ms");
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,15 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using API.Data;
|
||||
using API.Entities;
|
||||
using API.Interfaces;
|
||||
using API.Interfaces.Services;
|
||||
using API.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using NSubstitute;
|
||||
using Xunit;
|
||||
|
||||
namespace API.Tests.Services
|
||||
namespace API.Tests.Services
|
||||
{
|
||||
public class CacheServiceTests
|
||||
{
|
||||
|
@ -70,7 +59,7 @@ namespace API.Tests.Services
|
|||
// // Chapter = 0,
|
||||
// // FilePath = archivePath,
|
||||
// // Format = MangaFormat.Archive,
|
||||
// // NumberOfPages = 1,
|
||||
// // Pages = 1,
|
||||
// // }
|
||||
// // },
|
||||
// // Name = "1",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue