File tree Expand file tree Collapse file tree 2 files changed +40
-0
lines changed
Expand file tree Collapse file tree 2 files changed +40
-0
lines changed Original file line number Diff line number Diff line change 1+ package downloader ;
2+
3+ import junit .framework .TestCase ;
4+
5+ public class HttpClientDownloaderTest extends TestCase {
6+
7+ }
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments