-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMarkdownParseTest.java
More file actions
37 lines (37 loc) · 1.36 KB
/
MarkdownParseTest.java
File metadata and controls
37 lines (37 loc) · 1.36 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
import static org.junit.Assert.*;
import org.junit.*;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.List;
public class MarkdownParseTest {
@Test
public void addition() {
assertEquals(2, 1 + 1);
System.out.println("Hello World!");
}
@Test
public void getlink() throws IOException{
Path fileName = Path.of("myTestFile.md");
String content = Files.readString(fileName);
ArrayList<String> links = MarkdownParse.getLinks(content);
List<String> fileList = List.of("Chickenbutt","jhkjh");
assertEquals(links, fileList);
}
@Test
public void getlink2() throws IOException{
Path fileName = Path.of("test-file.md");
String content = Files.readString(fileName);
ArrayList<String> links = MarkdownParse.getLinks(content);
List<String> fileList = List.of("https://something.com","some-thing.html");
assertEquals(links, fileList);
}
@Test
public void getlink3() throws IOException{
Path fileName = Path.of("test-file.md");
String content = Files.readString(fileName);
ArrayList<String> links = MarkdownParse.getLinks(content);
List<String> fileList = List.of("https://something.co","some-thing.html");
assertEquals(links, fileList);
}}