finish up tests
This commit is contained in:
@@ -102,8 +102,9 @@ namespace FluentUriBuilder.Tests
|
||||
{
|
||||
var url = new UriBuilder("http://awesome.com")
|
||||
.WithParameter("awesome", "yodawg")
|
||||
.WithParameter("fun", null);
|
||||
Assert.Equal("http://awesome.com/?awesome=yodawg&fun", url.Uri.ToString());
|
||||
.WithParameter("fun", null)
|
||||
.WithParameter("cool", string.Empty);
|
||||
Assert.Equal("http://awesome.com/?awesome=yodawg&fun&cool", url.Uri.ToString());
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
@@ -51,11 +51,6 @@ namespace System
|
||||
throw new ArgumentNullException(nameof(pathSegment));
|
||||
}
|
||||
var path = pathSegment.TrimStart('/');
|
||||
if(string.IsNullOrWhiteSpace(bld.Path))
|
||||
{
|
||||
bld.Path = path;
|
||||
return bld;
|
||||
}
|
||||
bld.Path = $"{bld.Path.TrimEnd('/')}/{path}";
|
||||
return bld;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user