Skip to content

Commit

Permalink
feat: 🚧 add clearProposal functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
nickhumberstone committed Sep 16, 2024
1 parent c2ade93 commit d876f64
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,8 @@ public void addProposal(String proposal) {
proposals.add(proposal);
}

public void clearProposals() {
proposals.clear();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,11 @@ void should_be_able_to_add_multiple_proposals() {
service.addProposal("Proposal B");
assertThat(service.proposals()).contains("Proposal A", "Proposal B");
}

@Test
void should_be_able_to_clear_proposals() {
service.addProposal("I'm not empty");
service.clearProposals();
assertThat(service.proposals()).isEmpty();
}
}

0 comments on commit d876f64

Please sign in to comment.