forked from nidhidhamnani/markdown-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarkdownParseTest.java
More file actions
48 lines (40 loc) · 1.19 KB
/
Copy pathMarkdownParseTest.java
File metadata and controls
48 lines (40 loc) · 1.19 KB
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
import static org.junit.Assert.*;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.nio.file.Files;
import java.util.List;
import org.junit.*;
public class MarkdownParseTest extends MarkdownParse{
private String content;
private String content2;
private ArrayList<String> Links;
private ArrayList<String> Links2;
Path filename;
Path filename2;
@Before
public void setUp() throws IOException{
filename = Path.of("test-file.md");
content = Files.readString(filename);
Links = getLinks(content);
filename2 = Path.of("test-file2.md");
content2 = Files.readString(filename2);
Links2 = getLinks(content2);
}
@Test
public void addition() {
assertEquals(2, 1 + 1);
}
@Test
public void getLinksTest() {
List<String> list = List.of("https://something.com", "some-thing.html");
assertEquals(list, Links);
}
@Test
public void getLinksTest2() {
List<String> list = List.of("https://something.com", "some-page.html");
assertEquals(list, Links2);
System.out.println("Change");
}
}