@@ -29,9 +29,10 @@ public void FindNearestMatchingLine(IList<string> fromLines, IList<string> toLin
2929
3030 public class TheFindMatchingLineMethod
3131 {
32- [ TestCase ( new [ ] { "void method()" , "code" } , new [ ] { "void method()" , "// code" } , 1 , 1 ) ]
32+ [ TestCase ( new [ ] { "void method()" , "code" } , new [ ] { "void method()" , "// code" } , 1 , 1 , Description = "Find using line below" ) ]
33+ [ TestCase ( new [ ] { "void method()" , "code" } , new [ ] { "void method()" , "// code" , "// code" } , 2 , - 1 , Description = "Out of range" ) ]
34+ [ TestCase ( new [ ] { "code" } , new [ ] { "// code" } , 0 , - 1 , Description = "No matching line" ) ]
3335 [ TestCase ( new [ ] { "void method()" , "code" } , new [ ] { "void method()" } , 1 , 0 , Description = "Keep within bounds" ) ]
34- [ TestCase ( new [ ] { "code" } , new [ ] { "// code" } , 0 , - 1 ) ]
3536 [ TestCase ( new [ ] { "line" , "line" } , new [ ] { "line" , "line" } , 0 , 0 , Description = "Match nearest line" ) ]
3637 [ TestCase ( new [ ] { "line" , "line" } , new [ ] { "line" , "line" } , 1 , 1 , Description = "Match nearest line" ) ]
3738 public void FindNearestMatchingLine ( IList < string > fromLines , IList < string > toLines , int line ,
@@ -45,9 +46,5 @@ public void FindNearestMatchingLine(IList<string> fromLines, IList<string> toLin
4546 }
4647 }
4748
48- static NavigationService CreateNavigationService ( )
49- {
50- var sp = Substitute . For < IGitHubServiceProvider > ( ) ;
51- return new NavigationService ( sp ) ;
52- }
49+ static NavigationService CreateNavigationService ( ) => new NavigationService ( ) ;
5350}
0 commit comments