Skip to content

Missing tests for duplicate students in grade-school exercise #954

@marcelweikum

Description

@marcelweikum

Hey! This is my first issue and potentially my first PR (if I’m allowed to contribute 😄).

In the instructions for the grade-school exercise, it is stated that:

Note that all our students only have one name (It's a small town, what do you want?) and each student cannot be added more than once to a grade or the roster.
In fact, when a test attempts to add the same student more than once, your implementation should indicate that this is incorrect.

"In fact, when a test attempts to add the same student more than once, your implementation should indicate that this is incorrect."

However, there are currently no tests that enforce this behavior.

I see two options:

  1. Remove the instruction about duplicates, since it’s not being tested.
  2. Add test cases to enforce the behavior, such as:
    Preventing the same student from being added multiple times to the same grade
    Preventing the same student from being added multiple times to the entire roster (if that’s the intended rule)
    I've already implemented both test cases locally and would be happy to submit a PR. I just want to clarify which approach the maintainers prefer: removing the instruction or adding the tests?

Thanks in advance,
Marcel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions