Changes between Version 11 and Version 12 of UNPLANNED_UNIT_TEST_FIX_R0


Ignore:
Timestamp:
04/28/09 15:34:53 (16 years ago)
Author:
kyli
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UNPLANNED_UNIT_TEST_FIX_R0

    v11 v12  
    3232= Design = 
    3333 * While refactoring tests, look for the following things: 
     34  * Each test must have setUp() and tearDown methods, containing at least super.setUp() and super.tearDown(). 
    3435  * Tests should UnitTestBase or IntegrationTestBase 
    3536  * All resources needed for tests should be placed in the /src/test/resources folder of the module where the test is in 
    36   * Remove testing of simple getters 
     37  * Remove testing of obvious things 
    3738  * Repair fake JavaDoc 
    3839  * Where ither modules are needed, use FakeModuleRegistry.start(). In this case, make the class extend IntegrationTestBase. Look specifically at the modules ewhich have to be started, this is a common mistake. 
    3940  * Take care for "//TODO: refactor" things. 
    4041  * Remove "fail('not implemented')" methods. 
    41   * Refactor any "try{fail();} catch(Throwable){}" statements, since they are useless. Fix the errors that will appear after refactoring them. 
     42  * Refactor any "try{fail();} catch(Throwable){}" statements, since they are useless: if expected Exception, change to catch(Exception); If expected AssertionError, change to catch(Throwable){if (e instanceof AssertionFailedError) fail();} Fix the errors that will appear after refactoring them. 
    4243  * Either refactor commented tests, or delete them. 
    4344  * Look for the correct place of each test - if incorrect, fix it. 
     45  * Fix the assertEquals and assertSame arguments: first should be expected, then actual. 
    4446 * Here is a list of the current modules and what has to be changed there : 
    4547||org.sophie2.base.bound||refactor 
     
    6668||org.sophie2.extra.func.print||nothing - no tests 
    6769||org.sophie2.main.app.commons|| rename AppViewUnitTest to AppViewTest, make it an integration test. Thoroughly refactor BookViewUnitTest. Move AudioContentViewTest and VideoContentViewTest to org.sophie2.main.func.media, refactor ContentViewTest, review FrameAddUndoViewTest, fix "catch(Throwable e)"  statements, remove any "fail('not implemented')" methods. 
    68 ||org.sophie2.main.app.halos|| 
    69 ||org.sophie2.main.app.layout|| 
    70 ||org.sophie2.main.app.menus|| 
    71 ||org.sophie2.main.app.model|| 
    72 ||org.sophie2.main.dialogs.input|| 
    73 ||org.sophie2.main.func.config|| 
    74 ||org.sophie2.main.func.file|| 
    75 ||org.sophie2.main.func.help|| 
    76 ||org.sophie2.main.func.image|| 
    77 ||org.sophie2.main.func.links|| 
    78 ||org.sophie2.main.func.media|| 
    79 ||org.sophie2.main.func.resources|| 
    80 ||org.sophie2.main.func.servers|| 
    81 ||org.sophie2.main.layout.mydoggy|| 
    82 ||org.sophie2.main.layout.vldocking|| 
    83 ||org.sophie2.main.media.fobs|| 
    84 ||org.sophie2.main.persistence.r1|| 
    85 ||org.sophie2.main.persistence.r2|| 
    86 ||org.sophie2.main.scene.jogl|| 
    87 ||org.sophie2.main.scene.simple|| 
    88 ||org.sophie2.main.skin.alternative|| 
    89 ||org.sophie2.main.ws_connector|| 
    90 ||org.sophie2.server|| 
    91 ||org.sophie2.server.connector|| 
    92 ||org.sophie2.server.persistence|| 
     70||org.sophie2.main.app.halos||nothing - no tests 
     71||org.sophie2.main.app.layout||nothing - no tests 
     72||org.sophie2.main.app.menus||Make WindowMenuTest integration, decide whether to delete it. Refactor FileMenuTest, move SystemTestBase to org.sophie2.main.app.commons/src/main.java 
     73||org.sophie2.main.app.model||Move BackgroundStyleUnitTest, BorderStyleUnitTest, FrameAddUndoTest and FrameUnitTest to org.sophie2.base.model.book, refactor them. Remove BookLegacyTest, review the rest. 
     74||org.sophie2.main.dialogs.input||nothing - no tests 
     75||org.sophie2.main.func.config||nothing - no tests 
     76||org.sophie2.main.func.file||nothing - no tests 
     77||org.sophie2.main.func.help||nothing - no tests 
     78||org.sophie2.main.func.image||refactor 
     79||org.sophie2.main.func.links||nothing - OK 
     80||org.sophie2.main.func.media||nothing - no tests 
     81||org.sophie2.main.func.resources||nothing - no tests 
     82||org.sophie2.main.func.servers||nothing - no tests 
     83||org.sophie2.main.layout.mydoggy||rename MyDoggyLayoutDemo to test, since it is not a demo. Make it integration test, add the needed modules and refactor the failing cases. 
     84||org.sophie2.main.layout.vldocking||thoroughly refactor 
     85||org.sophie2.main.media.fobs||delete all 
     86||org.sophie2.main.persistence.r1||refactor (or delete) 
     87||org.sophie2.main.persistence.r2||nothing - no tests 
     88||org.sophie2.main.scene.jogl||nothing - no tests 
     89||org.sophie2.main.scene.simple||nothing - OK 
     90||org.sophie2.main.skin.alternative||nothing - no tests 
     91||org.sophie2.main.ws_connector||nothing - no tests 
     92||org.sophie2.server|| add setUp() and tearDown() methods, review 
     93||org.sophie2.server.connector||add setUp() and tearDown() methods, review. 
     94||org.sophie2.server.persistence||Remove default values of type "new Date()", add setUp() and tearDown() methods. 
    9395 
    9496