Migrate module to Magnolia 5 (MGNLCTS-31)

[MGNLCTS-35] Clean Up JUnit Tests and Make Sure Has > 30% Coverage Created: 12/Dec/13  Updated: 12/Jun/14  Resolved: 10/Jan/14

Status: Closed
Project: Content Translation Support
Component/s: None
Affects Version/s: None
Fix Version/s: 2.0

Type: Sub-task Priority: Neutral
Reporter: Peili Liang Assignee: Peili Liang
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Template:
Date of First Response:

 Description   
  • Make sure all new or changed methods are tested
  • Get rid of legacy tests that no longer work and has been replaced by newer tests (there should be no ignored tests, commented out tests, or deleted tests whose test logic has not been moved to an existing test)
  • Change any use of EasyMock to Mockito – there is no use of EasyMock
  • Check unit test coverage is >30% as reported by Clover – currently Clover reports coverage as >70%


 Comments   
Comment by Cheng Hu [ 20/Dec/13 ]

Unit tests that have been replaced and deleted:

  • Deleted DialogBasedNodeDataToTranslateFinderTest.testGetNodeDataToTranslate() because it no longer works. Replaced by TranslationFileDownloadDialogActionTest.testBuildParamsWithXls() and TranslationFileDownloadDialogActionTest.testBuildParamsWithCsv().
  • Deleted AbstractTranslationBundleWriter.testWriteRow() because it no longer works. Replaced by TranslationFileDownloadDialogActionTest.testBuildParamsWithFormat().
Comment by Cheng Hu [ 10/Jan/14 ]
[INFO] Clover Coverage Report
Coverage Timestamp: Fri Jan 10 23:45:33 CST 2014
Report for code   : APPLICATION


Coverage Overview -
Coverage:-
      Methods: 172/233 (73.8%)                                                                                                  
   Statements: 634/818 (77.5%)                                                                                                  
     Branches: 146/204 (71.6%)                                                                                                  
        Total: 75.9%                                                                                                            
Complexity:-
   Avg Method: 1.639
      Density: 0.467
        Total: 382
Comment by Cheng Hu [ 20/Jan/14 ]
[INFO] Clover Coverage Report
Coverage Timestamp: Tue Jan 21 00:54:10 CST 2014
Report for code   : APPLICATION


Coverage Overview -
Coverage:-
      Methods: 182/252 (72.2%)                                                                                                  
   Statements: 694/946 (73.4%)                                                                                                  
     Branches: 157/246 (63.8%)                                                                                                  
        Total: 71.5%                                                                                                            
Complexity:-
   Avg Method: 1.722
      Density: 0.459
        Total: 434
Generated at Mon Feb 12 00:32:34 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.