SERG-Delft / andy

Andy assesses student's test code. It's used in CSE1110, TU Delft.
MIT License
78 stars 22 forks source link

Run configuration extra step #212

Closed just-rares closed 1 year ago

just-rares commented 1 year ago

This pull request solves issue #173

Added a method in the GetRunConfigurationStep that checks the weights of the RunConfiguration and asserts whether they are valid with all the information available at the moment.

Changes:

If the configuration is invalid, the default one is set and an exception is thrown.

I tests the functionality of this method in the RunConfigurationTests file, where I used both unit tests to check the requirements of the method under test, some mocking to allow for disabling Pitest and Jacoco and one integration test with a library file with invalid weights to assert the error is indeed thrown and caught in the Result file.

Notes:

Any suggestions are welcomed, I am not very confident about my implementation of this issue

Arraying commented 1 year ago

Approved workflow run.

mauricioaniche commented 1 year ago

I just noticed the GradeWeights class. It also does some validations there (doesn't allow the sum not to be 100%). Are you using it here?

mauricioaniche commented 1 year ago

I'm closing this one for now. We can always re-open once you are back to it!