-
Notifications
You must be signed in to change notification settings - Fork 257
/
AtxMarkdownTocDirTest.java
49 lines (40 loc) · 1.07 KB
/
AtxMarkdownTocDirTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
* Copyright (c) 2018. houbinbin Inc.
* markdown-toc All rights reserved.
*/
package com.github.houbb.markdown.toc.core.impl;
import com.github.houbb.markdown.toc.util.TestPathUtil;
import com.github.houbb.markdown.toc.vo.TocGen;
import org.junit.Test;
import java.util.List;
/**
* AtxMarkdownToc 文件夹测试
*
* @author author
* @version 1.0
* @since 2018-01-30 15:11:47.256
*/
public class AtxMarkdownTocDirTest {
/**
* 不包含子元素-测试
*/
@Test
public void notSubTreeTest() {
String path = TestPathUtil.getAppRootPath("sub");
List<TocGen> tocGens = AtxMarkdownToc.newInstance()
.subTree(false)
.genTocDir(path);
System.out.println(tocGens.size());
}
/**
* 普通-测试
* 1. 默认进行文件的递归遍历
*/
@Test
public void commonTest() {
String path = TestPathUtil.getAppRootPath("sub");
List<TocGen> tocGens = AtxMarkdownToc.newInstance()
.genTocDir(path);
System.out.println(tocGens.size());
}
}