Kavita/API.Tests/Parser/BookParserTests.cs
Joseph Milazzo 3907414ae4
Shakeout Part 2 (#630)
* When flattening directories, ensure the order or directories being enumerated follows a natural sort. Some users are discovering directories in a different order than other machines.

* Added a case for volume parsing and fixed a poorly designed negative lookahead.

Added a sentence case pipe for formatting things.

Added time for all dates.

* Some more sentence case

* Register user now has a white input

* Fixed an issue with Manga up/down reading mode where top of the page was going forwards, when it should have gone backwards

* Reworked some code to ensure that scanseries doesn't show errors where in fact there was just nothing to update.

* Last updated should be working as intended for new library flow.

* Code smell
2021-10-03 15:40:22 -07:00

22 lines
696 B
C#

using Xunit;
namespace API.Tests.Parser
{
public class BookParserTests
{
[Theory]
[InlineData("Gifting The Wonderful World With Blessings! - 3 Side Stories [yuNS][Unknown]", "Gifting The Wonderful World With Blessings!")]
public void ParseSeriesTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseSeries(filename));
}
[Theory]
[InlineData("Harrison, Kim - Dates from Hell - Hollows Vol 2.5.epub", "2.5")]
public void ParseVolumeTest(string filename, string expected)
{
Assert.Equal(expected, API.Parser.Parser.ParseVolume(filename));
}
}
}