This pull request allows for a user of Instructor type, to create an exercise in the system.
Resolved Issue
Fixes #15
Changes
Adds ExerciseEndpoint
Adds DTO for incoming exercise
Adds validation for DTO
Adds testing of validation
Adds method to submit solution (Not tested, should be tested later)
Adds database insertions for an exercise and associated testcases and testcase-parameters
Additional Information
A few details to pay specific attention to:
The Submission Class, utilized for contacting the solution runner (mozart), is generally named, but takes ExerciseDto which is a specific usecase. Should the method be modified to be more general, or simply renamed to fit the describtion of the usecase?
In ExerciseRepository only a general catch (Exception) is used - auther is not sure what exceptions might occur. Feedback on this is welcome.
As mentioned in the section above, the validation process against the solution runner have not been tried. This means that at a later point this should be modified to handle potential reponses from mozart, and the ExerciseEndpoint should include a check, that discards an Insertion request from the frontend, in case of failed execution on mozart.
Consider if there are other segments of the added code that should be tested on a unit level, or it should instead be covered by later implemented integration testing.
Description
This pull request allows for a user of Instructor type, to create an exercise in the system.
Resolved Issue
Fixes #15
Changes
Additional Information
A few details to pay specific attention to:
catch (Exception)
is used - auther is not sure what exceptions might occur. Feedback on this is welcome.Checklist