Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3711

Refactor Unit Test classes to align with refactored Java API

    Details

    • Type: Code Task
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.0, 6.1, 6.2, 6.3
    • Fix Version/s: 7.0
    • Component/s: DSpace API
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      11
    • Documentation Status:
      Not Required

      Description

      In DSpace 6, we refactored the Java API to be service-oriented. However, we neglected to renamed/refactor the existing Unit Tests to align with the new API classes.

      So, for example, the Item class was refactored to an ItemService (and ItemServiceImpl):

      However, its unit test is still named ItemTest:

      While the Unit Tests themselves still help test our code / ensure it's working correctly, they are almost all mis-named.  The non-standard naming means that if we attempt to check test coverage (e.g. using tools like Coveralls, which we just enabled on "dspace-angular": https://coveralls.io/github/DSpace/dspace-angular), the coverage percentage is calculated to be 0%.

      We should refactor these tests so they align with the new API structure.  This would allow us to potentially enable Coveralls (or another coverage checking tool) and begin to improve our test coverage for DSpace going forward.

       

       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tom.desair Tom Desair (Atmire)
                Reporter:
                tdonohue Tim Donohue
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: