forked from hmol/LinkCrawler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,5 +46,26 @@ public void Parse_UrlOnlyRelativePath_True() | |
|
||
Assert.That(parsed, Is.EqualTo(validUrl)); | ||
} | ||
|
||
[Test] | ||
public void Parse_UrlOnlyLocalPath_True() | ||
{ | ||
var relativeUrl = "home"; | ||
string parsed; | ||
var result = ValidUrlParser.Parse(relativeUrl, out parsed); | ||
Assert.That(result, Is.True); | ||
var validUrl = string.Format("{0}/{1}", ValidUrlParser.BaseUrl, relativeUrl); | ||
|
||
Assert.That(parsed, Is.EqualTo(validUrl)); | ||
} | ||
|
||
[Test] | ||
public void Parse_UrlOnlyEmailPath_False() | ||
{ | ||
var relativeUrl = "mailto:[email protected]"; | ||
string parsed; | ||
var result = ValidUrlParser.Parse(relativeUrl, out parsed); | ||
Assert.That(result, Is.False); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters