@@ -625,6 +625,7 @@ def test_Subcommands_GoToReferences_MultipleProjects( self, app ):
625625 'response' : requests .codes .ok ,
626626 'data' : contains_inanyorder (
627627 LocationMatcher ( filepath , 8 , 35 ),
628+ LocationMatcher ( filepath , 5 , 21 ),
628629 LocationMatcher ( PathToTestFile ( 'multiple_projects' ,
629630 'src' ,
630631 'input' ,
@@ -662,26 +663,47 @@ def test_Subcommands_GoToReferences( self, app ):
662663
663664 response = app .post_json ( '/run_completer_command' , event_data ).json
664665
665- assert_that ( response , contains_exactly ( has_entries ( {
666- 'filepath' : PathToTestFile ( 'simple_eclipse_project' ,
667- 'src' ,
668- 'com' ,
669- 'test' ,
670- 'TestFactory.java' ),
671- 'column_num' : 9 ,
672- 'description' : " w.doSomethingVaguelyUseful();" ,
673- 'line_num' : 28
674- } ),
675- has_entries ( {
676- 'filepath' : PathToTestFile ( 'simple_eclipse_project' ,
677- 'src' ,
678- 'com' ,
679- 'test' ,
680- 'TestLauncher.java' ),
681- 'column_num' : 11 ,
682- 'description' : " w.doSomethingVaguelyUseful();" ,
683- 'line_num' : 32
684- } ) ) )
666+ assert_that ( response , contains_inanyorder (
667+ has_entries ( {
668+ 'filepath' : PathToTestFile ( 'simple_eclipse_project' ,
669+ 'src' ,
670+ 'com' ,
671+ 'test' ,
672+ 'AbstractTestWidget.java' ),
673+ 'column_num' : 15 ,
674+ 'description' : " public void doSomethingVaguelyUseful();" ,
675+ 'line_num' : 10
676+ } ),
677+ has_entries ( {
678+ 'filepath' : PathToTestFile ( 'simple_eclipse_project' ,
679+ 'src' ,
680+ 'com' ,
681+ 'test' ,
682+ 'TestFactory.java' ),
683+ 'column_num' : 9 ,
684+ 'description' : " w.doSomethingVaguelyUseful();" ,
685+ 'line_num' : 28
686+ } ),
687+ has_entries ( {
688+ 'filepath' : PathToTestFile ( 'simple_eclipse_project' ,
689+ 'src' ,
690+ 'com' ,
691+ 'test' ,
692+ 'TestLauncher.java' ),
693+ 'column_num' : 11 ,
694+ 'description' : " w.doSomethingVaguelyUseful();" ,
695+ 'line_num' : 32
696+ } ),
697+ has_entries ( {
698+ 'filepath' : PathToTestFile ( 'simple_eclipse_project' ,
699+ 'src' ,
700+ 'com' ,
701+ 'test' ,
702+ 'TestWidgetImpl.java' ),
703+ 'column_num' : 15 ,
704+ 'description' : " public void doSomethingVaguelyUseful() {" ,
705+ 'line_num' : 20
706+ } ) ) )
685707
686708
687709 @WithRetry ()
@@ -1093,6 +1115,16 @@ def test_Subcommands_FixIt_SingleDiag_MultipleOption_Insertion( self, app ):
10931115 'kind' : 'quickassist' ,
10941116 'text' : "Add Javadoc for 'Wimble'"
10951117 } ),
1118+ has_entries ( {
1119+ 'text' : "Sort Members for 'TestFactory.java'"
1120+ } ),
1121+ has_entries ( {
1122+ 'text' : "Add all missing imports"
1123+ } ),
1124+ # NOTE: bug (it seems) in jdt.ls, reports this code action 2x
1125+ has_entries ( {
1126+ 'text' : "Add all missing imports"
1127+ } ),
10961128 )
10971129 } )
10981130
@@ -1154,6 +1186,12 @@ def test_Subcommands_FixIt_SingleDiag_SingleOption_Modify( self, app ):
11541186 has_entries ( {
11551187 'text' : "Add Javadoc for 'getWidget'"
11561188 } ),
1189+ has_entries ( {
1190+ 'text' : "Sort Members for 'TestFactory.java'"
1191+ } ),
1192+ has_entries ( {
1193+ 'text' : "Add all missing imports"
1194+ } ),
11571195 )
11581196 } )
11591197
@@ -1222,6 +1260,12 @@ def test_Subcommands_FixIt_SingleDiag_MultiOption_Delete( self, app ):
12221260 'text' : "Add Javadoc for 'testString'" ,
12231261 'chunks' : instance_of ( list )
12241262 } ),
1263+ has_entries ( {
1264+ 'text' : "Sort Members for 'TestFactory.java'"
1265+ } ),
1266+ has_entries ( {
1267+ 'text' : "Add all missing imports"
1268+ } ),
12251269 )
12261270 } )
12271271
@@ -1304,6 +1348,12 @@ def test_Subcommands_FixIt_MultipleDiags( self, app ):
13041348 'text' : "Add Javadoc for 'getWidget'" ,
13051349 'chunks' : instance_of ( list ),
13061350 } ),
1351+ has_entries ( {
1352+ 'text' : "Sort Members for 'TestFactory.java'"
1353+ } ),
1354+ has_entries ( {
1355+ 'text' : "Add all missing imports"
1356+ } ),
13071357 ]
13081358
13091359 FIXITS = {
@@ -1432,6 +1482,9 @@ def test_Subcommands_FixIt_Range( self, app ):
14321482 'text' : "Add Javadoc for 'launch'" ,
14331483 'chunks' : instance_of ( list ),
14341484 } ),
1485+ has_entries ( {
1486+ 'text' : "Sort Members for 'TestLauncher.java'"
1487+ } ),
14351488 )
14361489 } )
14371490 }
@@ -1448,12 +1501,17 @@ def test_Subcommands_FixIt_NoDiagnostics( self, app ):
14481501 'test' ,
14491502 'TestFactory.java' )
14501503
1504+ # No FixIts is no lonber possible due to .. well all this crap
14511505 RunFixItTest ( app , "no FixIts means you gotta code it yo' self" ,
14521506 filepath , 1 , 1 , has_entries ( {
14531507 'fixits' : contains_inanyorder (
14541508 has_entries ( {
14551509 'text' : 'Change modifiers to final where possible' ,
14561510 'chunks' : instance_of ( list ) } ),
1511+ has_entries ( {
1512+ 'text' : "Sort Members for 'TestFactory.java'" } ),
1513+ has_entries ( {
1514+ 'text' : "Add all missing imports" } ),
14571515 has_entries ( { 'text' : 'Organize imports' ,
14581516 'chunks' : instance_of ( list ) } ),
14591517 has_entries ( { 'text' : 'Generate toString()' ,
@@ -1509,6 +1567,9 @@ def test_Subcommands_FixIt_Unicode( self, app ):
15091567 has_entries ( {
15101568 'text' : "Add Javadoc for 'DoWhatever'"
15111569 } ),
1570+ has_entries ( {
1571+ 'text' : "Sort Members for 'Test.java'" ,
1572+ } ),
15121573 )
15131574 } )
15141575
@@ -1573,6 +1634,12 @@ def test_Subcommands_FixIt_InvalidURI( self, app ):
15731634 has_entries ( {
15741635 'text' : "Add Javadoc for 'getWidget'"
15751636 } ),
1637+ has_entries ( {
1638+ 'text' : "Sort Members for 'TestFactory.java'"
1639+ } ),
1640+ has_entries ( {
1641+ 'text' : "Add all missing imports"
1642+ } ),
15761643 )
15771644 } )
15781645
0 commit comments