Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-32461

Add unit test for AssignmentAction (scalePointGrade)

    Details

    • Type: Feature Request
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12.0 [Tentative]
    • Component/s: Assignments
    • Labels:
      None

      Description

      scalePointGrade has had a few bugs lately and AssignmentAction has no unit test making it harder to validate that this method is correct. It's difficult to move this to the service because it takes SessionState as a parameter, which is used by validPointGrade to return error messages if the grade is invalid. However it still also returns a converted point even on an invalid grade.

      It seems a better workflow would be if this checked for validity then scaled, or if this method threw a custom exception instead. However this would require some refactoring of Assignment and I just wanted an easy way to validate this was working. This class might be useful for testing other methods too.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jonespm Matthew Jones
                  Reporter:
                  jonespm Matthew Jones
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: