Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a1527c058c | ||
|
|
908d0e2433 | ||
|
|
e9f3e5ed8b | ||
|
|
8b053f0f77 |
@@ -36,6 +36,17 @@ namespace FluentUriBuilder.Tests
|
||||
Assert.Equal("http://awesome.com/?awesome=yodawg", url.Uri.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void PathAndQuery()
|
||||
{
|
||||
var url = new UriBuilder().WithPathSegment("/awesome/v1/").WithParameter("awesome", "cool").PathAndQuery();
|
||||
Assert.Equal("/awesome/v1/?awesome=cool", url);
|
||||
url = new UriBuilder().WithPathSegment("/awesome/v1").WithParameter("awesome", "cool").PathAndQuery();
|
||||
Assert.Equal("/awesome/v1?awesome=cool", url);
|
||||
url = new UriBuilder().WithPathSegment("/awesome/v1").PathAndQuery();
|
||||
Assert.Equal("/awesome/v1", url);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void TestAddParameterArray()
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
},
|
||||
|
||||
"frameworks": {
|
||||
"net461": {},
|
||||
|
||||
"netcoreapp1.0": {
|
||||
"dependencies": {
|
||||
"Microsoft.NETCore.App": {
|
||||
|
||||
@@ -22,6 +22,7 @@ namespace System
|
||||
/// </summary>
|
||||
/// <param name="bld"></param>
|
||||
/// <param name="parameterDictionary"></param>
|
||||
/// <exception cref="ArgumentNullException"></exception>
|
||||
/// <returns></returns>
|
||||
public static UriBuilder WithParameter(this UriBuilder bld, IDictionary<string, string> parameterDictionary)
|
||||
{
|
||||
@@ -126,6 +127,11 @@ namespace System
|
||||
return bld;
|
||||
}
|
||||
|
||||
public static string PathAndQuery(this UriBuilder bld)
|
||||
{
|
||||
return bld.Path + bld.Query;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Use Https?
|
||||
/// </summary>
|
||||
|
||||
@@ -14,15 +14,19 @@
|
||||
"extension"
|
||||
]
|
||||
},
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.6.0"
|
||||
},
|
||||
"authors": [
|
||||
"Tommy Parnell"
|
||||
],
|
||||
"frameworks": {
|
||||
"netstandard1.1": {
|
||||
"imports": "dnxcore50",
|
||||
"dependencies": {
|
||||
"NETStandard.Library": "1.6.0"
|
||||
}
|
||||
},
|
||||
"net40": {
|
||||
"imports": "dnxcore50"
|
||||
}
|
||||
},
|
||||
"net45":{}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user