Fix AudioBookListResolver test coverage

This commit is contained in:
Bond_009
2020-10-12 20:09:15 +02:00
parent 2375c35c4a
commit 74f4affcda
2 changed files with 18 additions and 20 deletions

View File

@@ -1,3 +1,4 @@
#nullable enable
#pragma warning disable CS1591
using System;
@@ -16,21 +17,11 @@ namespace Emby.Naming.AudioBook
_options = options;
}
public AudioBookFileInfo ParseFile(string path)
public AudioBookFileInfo? Resolve(string path, bool isDirectory = false)
{
return Resolve(path, false);
}
public AudioBookFileInfo ParseDirectory(string path)
{
return Resolve(path, true);
}
public AudioBookFileInfo Resolve(string path, bool isDirectory = false)
{
if (string.IsNullOrEmpty(path))
if (path.Length == 0)
{
throw new ArgumentNullException(nameof(path));
throw new ArgumentException("String can't be empty.", nameof(path));
}
// TODO