@@ -400,8 +400,9 @@ public void GivenQueryWithFileTypeResult_WhenGetAutoComplete_ThenResultShouldBeE
400
400
[ TestCase ( @"c:\foo" , @"c:\foo" , true ) ]
401
401
[ TestCase ( @"C:\Foo\" , @"c:\foo\" , true ) ]
402
402
[ TestCase ( @"c:\foo" , @"c:\foo\" , false ) ]
403
- public void PathEqualityComparatorEquality ( string path1 , string path2 , bool expectedResult )
403
+ public void GivenTwoPaths_WhenCompared_ThenShouldBeExpectedSameOrDifferent ( string path1 , string path2 , bool expectedResult )
404
404
{
405
+ // Given
405
406
var comparator = PathEqualityComparator . Instance ;
406
407
var result1 = new Result
407
408
{
@@ -413,13 +414,16 @@ public void PathEqualityComparatorEquality(string path1, string path2, bool expe
413
414
Title = Path . GetFileName ( path2 ) ,
414
415
SubTitle = path2
415
416
} ;
417
+
418
+ // When, Then
416
419
Assert . AreEqual ( expectedResult , comparator . Equals ( result1 , result2 ) ) ;
417
420
}
418
421
419
422
[ TestCase ( @"c:\foo\" , @"c:\foo\" ) ]
420
423
[ TestCase ( @"C:\Foo\" , @"c:\foo\" ) ]
421
- public void PathEqualityComparatorHashCode ( string path1 , string path2 )
424
+ public void GivenTwoPaths_WhenComparedHasCode_ThenShouldBeSame ( string path1 , string path2 )
422
425
{
426
+ // Given
423
427
var comparator = PathEqualityComparator . Instance ;
424
428
var result1 = new Result
425
429
{
@@ -431,8 +435,11 @@ public void PathEqualityComparatorHashCode(string path1, string path2)
431
435
Title = Path . GetFileName ( path2 ) ,
432
436
SubTitle = path2
433
437
} ;
438
+
434
439
var hash1 = comparator . GetHashCode ( result1 ) ;
435
440
var hash2 = comparator . GetHashCode ( result2 ) ;
441
+
442
+ // When, Then
436
443
Assert . IsTrue ( hash1 == hash2 ) ;
437
444
}
438
445
}
0 commit comments