@@ -290,12 +290,12 @@ public void DetectsTheExactRenamingOfFilesByDefault()
290
290
291
291
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
292
292
293
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ) ;
293
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ) ;
294
294
295
295
Assert . Equal ( 1 , changes . Count ( ) ) ;
296
296
Assert . Equal ( 1 , changes . Renamed . Count ( ) ) ;
297
- Assert . Equal ( "original.txt" , changes . Renamed . Single ( ) . OldPath ) ;
298
- Assert . Equal ( "renamed.txt" , changes . Renamed . Single ( ) . Path ) ;
297
+ Assert . Equal ( originalPath , changes . Renamed . Single ( ) . OldPath ) ;
298
+ Assert . Equal ( renamedPath , changes . Renamed . Single ( ) . Path ) ;
299
299
}
300
300
}
301
301
@@ -337,7 +337,7 @@ public void RenameThresholdsAreObeyed()
337
337
} ;
338
338
339
339
compareOptions . Similarity . RenameThreshold = 30 ;
340
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree , compareOptions : compareOptions ) ;
340
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree , compareOptions : compareOptions ) ;
341
341
Assert . True ( changes . All ( x => x . Status == ChangeKind . Renamed ) ) ;
342
342
343
343
compareOptions . Similarity . RenameThreshold = 90 ;
@@ -366,16 +366,16 @@ public void ExactModeDetectsExactRenames()
366
366
367
367
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
368
368
369
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
369
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
370
370
compareOptions : new CompareOptions
371
371
{
372
372
Similarity = SimilarityOptions . Exact ,
373
373
} ) ;
374
374
375
375
Assert . Equal ( 1 , changes . Count ( ) ) ;
376
376
Assert . Equal ( 1 , changes . Renamed . Count ( ) ) ;
377
- Assert . Equal ( "original.txt" , changes . Renamed . Single ( ) . OldPath ) ;
378
- Assert . Equal ( "renamed.txt" , changes . Renamed . Single ( ) . Path ) ;
377
+ Assert . Equal ( originalPath , changes . Renamed . Single ( ) . OldPath ) ;
378
+ Assert . Equal ( renamedPath , changes . Renamed . Single ( ) . Path ) ;
379
379
}
380
380
}
381
381
@@ -400,7 +400,7 @@ public void ExactModeDetectsExactCopies()
400
400
401
401
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
402
402
403
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
403
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
404
404
compareOptions : new CompareOptions
405
405
{
406
406
Similarity = SimilarityOptions . Exact ,
@@ -433,7 +433,7 @@ public void ExactModeDoesntDetectRenamesWithEdits()
433
433
434
434
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
435
435
436
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
436
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
437
437
compareOptions : new CompareOptions
438
438
{
439
439
Similarity = SimilarityOptions . Exact ,
@@ -469,7 +469,7 @@ public void CanIncludeUnmodifiedEntriesWhenDetectingTheExactRenamingOfFilesWhenE
469
469
470
470
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
471
471
472
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
472
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
473
473
compareOptions :
474
474
new CompareOptions
475
475
{
@@ -480,8 +480,8 @@ public void CanIncludeUnmodifiedEntriesWhenDetectingTheExactRenamingOfFilesWhenE
480
480
Assert . Equal ( 2 , changes . Count ( ) ) ;
481
481
Assert . Equal ( 1 , changes . Unmodified . Count ( ) ) ;
482
482
Assert . Equal ( 1 , changes . Copied . Count ( ) ) ;
483
- Assert . Equal ( "original.txt" , changes . Copied . Single ( ) . OldPath ) ;
484
- Assert . Equal ( "copied.txt" , changes . Copied . Single ( ) . Path ) ;
483
+ Assert . Equal ( originalPath , changes . Copied . Single ( ) . OldPath ) ;
484
+ Assert . Equal ( copiedPath , changes . Copied . Single ( ) . Path ) ;
485
485
}
486
486
}
487
487
@@ -505,7 +505,7 @@ public void CanNotDetectTheExactRenamingFilesWhenNotEnabled()
505
505
506
506
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
507
507
508
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
508
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
509
509
compareOptions :
510
510
new CompareOptions
511
511
{
@@ -540,7 +540,7 @@ public void CanDetectTheExactCopyingOfNonModifiedFilesWhenEnabled()
540
540
541
541
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
542
542
543
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
543
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
544
544
compareOptions :
545
545
new CompareOptions
546
546
{
@@ -549,8 +549,8 @@ public void CanDetectTheExactCopyingOfNonModifiedFilesWhenEnabled()
549
549
550
550
Assert . Equal ( 1 , changes . Count ( ) ) ;
551
551
Assert . Equal ( 1 , changes . Copied . Count ( ) ) ;
552
- Assert . Equal ( "original.txt" , changes . Copied . Single ( ) . OldPath ) ;
553
- Assert . Equal ( "copied.txt" , changes . Copied . Single ( ) . Path ) ;
552
+ Assert . Equal ( originalPath , changes . Copied . Single ( ) . OldPath ) ;
553
+ Assert . Equal ( copiedPath , changes . Copied . Single ( ) . Path ) ;
554
554
}
555
555
}
556
556
@@ -577,7 +577,7 @@ public void CanNotDetectTheExactCopyingOfNonModifiedFilesWhenNotEnabled()
577
577
578
578
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
579
579
580
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ) ;
580
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ) ;
581
581
582
582
Assert . Equal ( 1 , changes . Count ( ) ) ;
583
583
Assert . Equal ( 0 , changes . Copied . Count ( ) ) ;
@@ -610,7 +610,7 @@ public void CanDetectTheExactCopyingOfModifiedFilesWhenEnabled()
610
610
611
611
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
612
612
613
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
613
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
614
614
compareOptions :
615
615
new CompareOptions
616
616
{
@@ -619,8 +619,8 @@ public void CanDetectTheExactCopyingOfModifiedFilesWhenEnabled()
619
619
620
620
Assert . Equal ( 2 , changes . Count ( ) ) ;
621
621
Assert . Equal ( 1 , changes . Copied . Count ( ) ) ;
622
- Assert . Equal ( "original.txt" , changes . Copied . Single ( ) . OldPath ) ;
623
- Assert . Equal ( "copied.txt" , changes . Copied . Single ( ) . Path ) ;
622
+ Assert . Equal ( originalPath , changes . Copied . Single ( ) . OldPath ) ;
623
+ Assert . Equal ( copiedPath , changes . Copied . Single ( ) . Path ) ;
624
624
}
625
625
}
626
626
@@ -650,7 +650,7 @@ public void CanNotDetectTheExactCopyingOfModifiedFilesWhenNotEnabled()
650
650
651
651
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
652
652
653
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ) ;
653
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ) ;
654
654
655
655
Assert . Equal ( 2 , changes . Count ( ) ) ;
656
656
Assert . Equal ( 0 , changes . Copied . Count ( ) ) ;
@@ -674,7 +674,7 @@ public void CanIncludeUnmodifiedEntriesWhenEnabled()
674
674
repo . Index . Stage ( "b.txt" ) ;
675
675
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
676
676
677
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
677
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
678
678
compareOptions : new CompareOptions { IncludeUnmodified = true } ) ;
679
679
680
680
Assert . Equal ( 2 , changes . Count ( ) ) ;
@@ -722,7 +722,7 @@ public void CanDetectTheExactRenamingExactCopyingOfNonModifiedAndModifiedFilesWh
722
722
723
723
Commit @new = repo . Commit ( "Updated" , Constants . Signature , Constants . Signature ) ;
724
724
725
- TreeChanges changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
725
+ var changes = repo . Diff . Compare < TreeChanges > ( old . Tree , @new . Tree ,
726
726
compareOptions :
727
727
new CompareOptions
728
728
{
@@ -732,13 +732,13 @@ public void CanDetectTheExactRenamingExactCopyingOfNonModifiedAndModifiedFilesWh
732
732
Assert . Equal ( 4 , changes . Count ( ) ) ;
733
733
Assert . Equal ( 1 , changes . Modified . Count ( ) ) ;
734
734
Assert . Equal ( 1 , changes . Renamed . Count ( ) ) ;
735
- Assert . Equal ( "original.txt" , changes . Renamed . Single ( ) . OldPath ) ;
736
- Assert . Equal ( "renamed.txt" , changes . Renamed . Single ( ) . Path ) ;
735
+ Assert . Equal ( originalPath , changes . Renamed . Single ( ) . OldPath ) ;
736
+ Assert . Equal ( renamedPath , changes . Renamed . Single ( ) . Path ) ;
737
737
Assert . Equal ( 2 , changes . Copied . Count ( ) ) ;
738
- Assert . Equal ( "original2.txt" , changes . Copied . ElementAt ( 0 ) . OldPath ) ;
739
- Assert . Equal ( "copied.txt" , changes . Copied . ElementAt ( 0 ) . Path ) ;
740
- Assert . Equal ( "original3.txt" , changes . Copied . ElementAt ( 1 ) . OldPath ) ;
741
- Assert . Equal ( "copied2.txt" , changes . Copied . ElementAt ( 1 ) . Path ) ;
738
+ Assert . Equal ( originalPath2 , changes . Copied . ElementAt ( 0 ) . OldPath ) ;
739
+ Assert . Equal ( copiedPath1 , changes . Copied . ElementAt ( 0 ) . Path ) ;
740
+ Assert . Equal ( originalPath3 , changes . Copied . ElementAt ( 1 ) . OldPath ) ;
741
+ Assert . Equal ( copiedPath2 , changes . Copied . ElementAt ( 1 ) . Path ) ;
742
742
}
743
743
}
744
744
/*
0 commit comments