Skip to content

Commit 6e9799e

Browse files
committed
create junit file
1 parent 709e18f commit 6e9799e

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package downloader;
2+
3+
import junit.framework.TestCase;
4+
5+
public class HttpClientDownloaderTest extends TestCase {
6+
7+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
package scheduler;
2+
3+
import java.util.regex.Matcher;
4+
import java.util.regex.Pattern;
5+
6+
import org.junit.Test;
7+
8+
import junit.framework.TestCase;
9+
10+
public class ParserTaskTest extends TestCase {
11+
12+
@Test
13+
public void testIsType() {
14+
ParserTask parserTask = new ParserTask("https://leetcode.com/problems/house-robber/");
15+
parserTask.isType();
16+
System.out.println(parserTask.getType());
17+
}
18+
19+
@Test
20+
public void testCheckedPattern() {
21+
String url = "https://leetcode.com/problems/house-robber/";
22+
String patternString = ".*/problems/.*";
23+
Pattern pattern = Pattern.compile(patternString);
24+
Matcher matcher = pattern.matcher(url);
25+
boolean res = matcher.matches();
26+
System.out.println(res);
27+
}
28+
29+
@Test
30+
public void testEnum() {
31+
System.out.println(ParserTask.TaskType.PROBLEM_URL.ordinal());
32+
}
33+
}

0 commit comments

Comments
 (0)