This repository was archived by the owner on Nov 20, 2018. It is now read-only.
File tree 2 files changed +7
-2
lines changed
src/Microsoft.AspNetCore.Http.Abstractions
test/Microsoft.AspNetCore.Http.Abstractions.Tests
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -213,7 +213,7 @@ public string Add(QueryString other)
213
213
/// <returns>True if both PathString values are equal</returns>
214
214
public bool Equals ( PathString other )
215
215
{
216
- return this . Equals ( other , StringComparison . OrdinalIgnoreCase ) ;
216
+ return Equals ( other , StringComparison . OrdinalIgnoreCase ) ;
217
217
}
218
218
219
219
/// <summary>
@@ -240,7 +240,7 @@ public override bool Equals(object obj)
240
240
{
241
241
if ( ReferenceEquals ( null , obj ) )
242
242
{
243
- return false ;
243
+ return ! HasValue ;
244
244
}
245
245
return obj is PathString && Equals ( ( PathString ) obj ) ;
246
246
}
Original file line number Diff line number Diff line change @@ -21,6 +21,11 @@ public void Equals_EmptyPathStringAndDefaultPathString()
21
21
{
22
22
// Act and Assert
23
23
Assert . Equal ( PathString . Empty , default ( PathString ) ) ;
24
+ Assert . Equal ( default ( PathString ) , PathString . Empty ) ;
25
+ Assert . True ( PathString . Empty == default ( PathString ) ) ;
26
+ Assert . True ( default ( PathString ) == PathString . Empty ) ;
27
+ Assert . True ( PathString . Empty . Equals ( default ( PathString ) ) ) ;
28
+ Assert . True ( default ( PathString ) . Equals ( PathString . Empty ) ) ;
24
29
}
25
30
26
31
[ Fact ]
You can’t perform that action at this time.
0 commit comments