Skip to content

Commit

Permalink
#1008: minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
clean-coder committed Sep 27, 2024
1 parent 26e7641 commit 8fa1bf5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private static void assertCheckInMetricDto(CheckInMetricDto checkInMetricDto) {
assertEquals(23, checkInMetricDto.value());
}

@DisplayName("deserialize() should return CheckInMetricDto for ordinal json")
@DisplayName("deserialize() should return CheckInOrdinalDto for ordinal json")
@Test
void deserializeShouldReturnCheckInOrdinalDtoForOrdinalJson() throws Exception {
// arrange
Expand Down Expand Up @@ -168,9 +168,9 @@ public String getKeyResultType() {
assertEquals("unsupported checkIn DTO to deserialize", responseStatusException.getReason());
}

@DisplayName("deserialize() should throw ResponseStatusException json has no KeyResult Id")
@DisplayName("deserialize() should throw ResponseStatusException if json has no KeyResult Id")
@Test
void deserializeShouldThrowResponseStatusExceptionJsonHasNoKeyResultId() throws Exception {
void deserializeShouldThrowResponseStatusExceptionIfJsonHasNoKeyResultId() throws Exception {
// arrange
String jsonWithoutKeyResultId = """
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,18 +91,18 @@ private void assertKeyResultMetricDto(KeyResultMetricDto keyResultMetricDto) {
assertObjective(objective);
}

private static void assertObjective(KeyResultObjectiveDto objective) {
assertNotNull(objective);
assertEquals(1000, objective.id());
}

private static void assertOwner(KeyResultUserDto owner) {
assertNotNull(owner);
assertEquals(1000, owner.id());
assertEquals("Jaya", owner.firstname());
assertEquals("Norris", owner.lastname());
}

private static void assertObjective(KeyResultObjectiveDto objective) {
assertNotNull(objective);
assertEquals(1000, objective.id());
}

@DisplayName("deserialize() should return KeyResultOrdinalDto for ordinal json")
@Test
void deserializeShouldReturnKeyResultOrdinalDtoForOrdinalJson() throws Exception {
Expand Down Expand Up @@ -193,7 +193,7 @@ void deserializeShouldThrowResponseStatusExceptionIfKeyResultIsUnsupportedType()

@DisplayName("deserialize() should throw ResponseStatusException if json has no KeyResult Type")
@Test
void deserializeShouldThrowResponseStatusExceptionJsonHasNoKeyResultType() throws Exception {
void deserializeShouldThrowResponseStatusExceptionIfJsonHasNoKeyResultType() throws Exception {
// arrange
String jsonMetric = """
{
Expand Down

0 comments on commit 8fa1bf5

Please sign in to comment.