MetroCS / redistricting

Experimentation with geopolitical redistricting
GNU Affero General Public License v3.0
5 stars 75 forks source link

[UserStory] StarGenerator invalid parameter value handling #189

Closed ColinLouis95 closed 2 years ago

ColinLouis95 commented 2 years ago

User Story

Essential components

Story

As a Programmer I want invalid inputs for the StarGenerator.java generatePattern method to throw exceptions so that I know an invalid parameter value was passed instead of a stack overflow error.

Acceptance Criteria

Supporting Information

(Currently method throws stack overflow error if given values of 0 or less.)

jody commented 2 years ago

This User Story should describe the problem to be addressed rather than prescribing a specific solution. For example, why is throwing an exception the only appropriate way to handle specific parameter values?

Likewise, why is "invalidInputException" the proper exception to be thrown? Why not "InvalidParameterException", "IllegalArgumentException", or some other exception? The acceptance criteria appear to be prescribing a particular solution rather than characteristics of any acceptable solution.

jody commented 2 years ago

No response in over 30 days.