|
1 | | -using OriginLab.DocumentGeneration.Templates; |
2 | | - |
3 | | -namespace OriginLab.DocumentGeneration.Tests; |
| 1 | +namespace OriginLab.DocumentGeneration.Tests; |
4 | 2 |
|
5 | 3 | public class DocToStaticPagesTransformerTests |
6 | 4 | { |
7 | 5 | [Theory] |
8 | | - [InlineData("./GettingStarted/Category/Origin_9.1_Getting_Started_Booklet.html", "en", "/user-guide/", "User Guide")] |
9 | | - [InlineData("./GettingStarted/Category/Origin_9.1_Getting_Started_Booklet.html", "de", "/user-guide/de/", "User Guide")] |
10 | | - public async Task HrefShouldResolveCorrectly(string href, string language, string expectedUrl, string expectedTitle) |
| 6 | + [InlineData("./A/Category/App(App).html", "app", "en", "/app/", "Apps")] |
| 7 | + [InlineData("./A/Category/App(App).html", "app", "de", "/app/de/", "Apps")] |
| 8 | + [InlineData("./A/App/A.html", "app", "en", "/app/a/", "App A")] |
| 9 | + [InlineData("./A/App/B.html", "app", "de", "/app/b/de/", "App B")] |
| 10 | + [InlineData("./A/App/B_Script.html", "app", "de", "/build/b-scripts/de/", "B Scripts (Moved from App)")] |
| 11 | + public async Task HrefShouldResolveCorrectly(string href, string book, string language, string expectedUrl, string expectedTitle) |
11 | 12 | { |
12 | | - var bookDir = Path.GetFullPath("../../../index", Template.WebRootPath); |
| 13 | + var bookDir = Path.GetFullPath("../../../../converter/tests/books/" + book, AppContext.BaseDirectory); |
13 | 14 | var args = new DocToStaticPagesTransformerArgs |
14 | 15 | { |
15 | 16 | BookUrlName = "", |
16 | | - BooksXmlFolder = Path.GetFullPath("../../../books", Template.WebRootPath), |
| 17 | + BooksXmlFolder = Path.GetFullPath("../xml", bookDir), |
17 | 18 | SourceFolder = bookDir, |
18 | | - OutputFolder = Path.GetFullPath("../../../artifacts/tests/public_html", Template.WebRootPath), |
| 19 | + OutputFolder = Path.GetFullPath("../../../../artifacts/tests/public_html" + book, AppContext.BaseDirectory), |
19 | 20 | }; |
20 | 21 | var transformer = new FakeDocToStaticPagesTransformer(args, new ProblemRecorder(args)); |
21 | 22 |
|
|
0 commit comments