Skip to content

Commit

Permalink
Addressed Review Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
muthusubra committed May 14, 2024
1 parent ddd6634 commit 6a3648c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@

import java.util.stream.Stream;

/**
* static data migrated from TOGDATA.EVIDENCE_FEE_RULES table
*/
@Getter
@AllArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,44 +13,20 @@ void givenABlankString_whenGetFromIsInvoked_thenNullIsReturned() {
}

@Test
void valueOfCurrentStatusFromString_nullParameter_ReturnsNull() {
void givenAInValidValue_whenGetFromIsInvoked_thenReturnsException() {
assertThatThrownBy(
() -> IncomeEvidence.getFrom("MOCK_RESULT_STRING")
).isInstanceOf(IllegalArgumentException.class);
}

@Test
void testGetFrom() {
void givenAValidValue_whenGetFromIsInvoked_thenReturnsValue() {
IncomeEvidence result = IncomeEvidence.getFrom("SIGNATURE");
assertThat(result).isEqualTo(IncomeEvidence.SIGNATURE);
}

@Test
void testValues() {
IncomeEvidence[] result = IncomeEvidence.values();
assertThat(result).isEqualTo(new IncomeEvidence[]{
IncomeEvidence.SIGNATURE,
IncomeEvidence.CDS15,
IncomeEvidence.FREEZING,
IncomeEvidence.RESTRAINING,
IncomeEvidence.CONFISCATION,
IncomeEvidence.OTHER_ADHOC,
IncomeEvidence.EMP_LETTER_ADHOC,
IncomeEvidence.WAGE_SLIP_ADHOC,
IncomeEvidence.NINO,
IncomeEvidence.ACCOUNTS,
IncomeEvidence.OTHER_BUSINESS,
IncomeEvidence.CASH_BOOK,
IncomeEvidence.WAGE_SLIP,
IncomeEvidence.BANK_STATEMENT,
IncomeEvidence.TAX_RETURN,
IncomeEvidence.EMP_LETTER,
IncomeEvidence.OTHER
});
}

@Test
void testValueOf() {
void givenAValidValue_whenGetFromIsInvoked_thenCorrectValueIsReturned() {
IncomeEvidence result = IncomeEvidence.valueOf("SIGNATURE");
assertThat(result).isEqualTo(IncomeEvidence.SIGNATURE);
}
Expand Down

0 comments on commit 6a3648c

Please sign in to comment.