From 6a3648c781114396632df3c2a489e0ea26ffd8e0 Mon Sep 17 00:00:00 2001 From: muthusubra Date: Tue, 14 May 2024 11:15:37 +0100 Subject: [PATCH] Addressed Review Comments --- .../staticdata/enums/IncomeEvidence.java | 3 -- .../staticdata/enums/IncomeEvidenceTest.java | 30 ++----------------- 2 files changed, 3 insertions(+), 30 deletions(-) diff --git a/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidence.java b/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidence.java index 92aeb49..562c065 100644 --- a/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidence.java +++ b/crime-evidence/src/main/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidence.java @@ -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) diff --git a/crime-evidence/src/test/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidenceTest.java b/crime-evidence/src/test/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidenceTest.java index 15f7f82..b9b5386 100644 --- a/crime-evidence/src/test/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidenceTest.java +++ b/crime-evidence/src/test/java/uk/gov/justice/laa/crime/evidence/staticdata/enums/IncomeEvidenceTest.java @@ -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); }