Skip to content

Commit

Permalink
Refactor variable name for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyeh committed Nov 21, 2023
1 parent f3dcb11 commit d5d67e5
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ public void shouldGetSpecifiedValidatorBalancesFromState() throws Exception {
.build();
request.setRequestBody(List.of("1", "2"));

final Optional<ObjectAndMetaData<List<StateValidatorBalanceData>>> stateValidatorBalancesData =
final Optional<ObjectAndMetaData<List<StateValidatorBalanceData>>> expectedData =
chainDataProvider.getStateValidatorBalances("head", List.of("1", "2")).get();

handler.handleRequest(request);

assertThat(request.getResponseCode()).isEqualTo(SC_OK);
assertThat(request.getResponseBody()).isEqualTo(stateValidatorBalancesData.orElseThrow());
assertThat(request.getResponseBody()).isEqualTo(expectedData.orElseThrow());
}

@Test
Expand All @@ -74,13 +74,13 @@ public void shouldGetAllValidatorBalancesFromState() throws Exception {
.pathParameter("state_id", "head")
.build();

final Optional<ObjectAndMetaData<List<StateValidatorBalanceData>>> stateValidatorBalancesData =
final Optional<ObjectAndMetaData<List<StateValidatorBalanceData>>> expectedData =
chainDataProvider.getStateValidatorBalances("head", List.of()).get();

handler.handleRequest(request);

assertThat(request.getResponseCode()).isEqualTo(SC_OK);
assertThat(request.getResponseBody()).isEqualTo(stateValidatorBalancesData.orElseThrow());
assertThat(request.getResponseBody()).isEqualTo(expectedData.orElseThrow());
}

@Test
Expand Down

0 comments on commit d5d67e5

Please sign in to comment.