forked from FishInAZ/makrdown-parse-own
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarkdownParseTest.java
More file actions
52 lines (41 loc) · 1.19 KB
/
Copy pathMarkdownParseTest.java
File metadata and controls
52 lines (41 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
49
50
51
52
import static org.junit.Assert.*;
import org.junit.*;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Files;
import java.nio.file.*;
import java.util.ArrayList;
import java.util.*;
public class MarkdownParseTest {
@Test
public void addition() {
assertEquals(2, 1 + 1);
}
/**
@Test
public void getLinks(){
try{
Path file = Path.of("test-markdown.md");
String content = Files.readString(file);
ArrayList<String> links = MarkdownParse.getLinks(content);
String link = "https://something.com";
String link2 = "some-page.html";
assertEquals(List.of(link,link2), links);
}
catch(IOException e){
e.printStackTrace();
}
}
@Test
public void getPicture(){
try{
Path var1 = Path.of("test-file4.md");
String test = Files.readString(var1);
ArrayList<String> array = new ArrayList<>();
assertEquals("Nothing should be returned", array, MarkdownParse.getLinks(test));
}catch(IOException e){
e.printStackTrace();
}
}
*/
}