Skip to content

Commit

Permalink
#23 テストパターンの追加
Browse files Browse the repository at this point in the history
  • Loading branch information
TakenPt committed Apr 11, 2024
1 parent a8288d6 commit 88e7290
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions KoeBook.Test/Epub/ScrapingAozoraServiceTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using AngleSharp.Dom;
using KoeBook.Epub.Models;
using KoeBook.Epub.Services;
using KoeBook.Core.Models;

namespace KoeBook.Test.Epub;

Expand All @@ -19,9 +20,14 @@ public static object[][] ProcessChildrenTestCases()
// CssClass[]: ProcessChildren実行後にあるべきScrapingAozoraService._document.CssClassesに追加したいCssClassを列挙する。

(string, EpubDocument, CssClass[], EpubDocument, CssClass[])[] patterns = [
// レイアウト
// 1.1 改丁
(@"<span class=""notes"">[#改丁]</span>", EmptySingleParagraph, [], new EpubDocument("", "", "", Guid.NewGuid()) { Chapters = [new Chapter() { Sections = [new Section("") { Elements = [new Paragraph() { Text = "[#改丁]", ScriptLine = new Core.Models.ScriptLine("", "", "") }] }] }] }, []),
// レイアウト1.1 改丁
(@"<span class=""notes"">[#改丁]</span><br>", EmptySingleParagraph, [], new EpubDocument("", "", "", Guid.NewGuid()) { Chapters = [new Chapter() { Sections = [new Section("") { Elements = [new Paragraph() { Text = "[#改丁]", ScriptLine = new ScriptLine("", "", "") }] }] }] }, []),
// レイアウト1.2 改ページ
(@"<span class=""notes"">[#改ページ]</span><br>", EmptySingleParagraph, [], new EpubDocument("", "", "", Guid.NewGuid()) { Chapters = [new Chapter() { Sections = [new Section("") { Elements = [new Paragraph() { Text = "[#改ページ]", ScriptLine = new ScriptLine("", "", "") }] }] }] }, []),
// レイアウト1.3 改見開き
(@"<span class=""notes"">[#改見開き]</span><br>", EmptySingleParagraph, [], new EpubDocument("", "", "", Guid.NewGuid()) { Chapters = [new Chapter() { Sections = [new Section("") { Elements = [new Paragraph() { Text = "[#改見開き]", ScriptLine = new ScriptLine("", "", "") }] }] }] }, []),
// レイアウト1.4 改段
(@"<span class=""notes"">[#改段]</span><br />", EmptySingleParagraph, [], new EpubDocument("", "", "", Guid.NewGuid()) { Chapters = [new Chapter() { Sections = [new Section("") { Elements = [new Paragraph() { Text = "[#改段]", ScriptLine = new ScriptLine("", "", "") }] }] }] }, []),
];

for (int i = 0; i < patterns.Length; i++)
Expand Down

0 comments on commit 88e7290

Please sign in to comment.