Skip to content

Commit 2bb35a8

Browse files
committed
format code of testcase
1 parent 801e7ae commit 2bb35a8

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

framework/src/test/java/org/tron/core/services/filter/CachedBodyRequestWrapperTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ private static byte[] readFully(javax.servlet.ServletInputStream in) throws IOEx
2929
public void getInputStream_returnsBodyContent() throws IOException {
3030
CachedBodyRequestWrapper w = new CachedBodyRequestWrapper(new MockHttpServletRequest(), BODY);
3131
byte[] read = readFully(w.getInputStream());
32-
assertEquals(new String(BODY, StandardCharsets.UTF_8), new String(read, StandardCharsets.UTF_8));
32+
assertEquals(new String(BODY, StandardCharsets.UTF_8),
33+
new String(read, StandardCharsets.UTF_8));
3334
}
3435

3536
@Test

framework/src/test/java/org/tron/core/services/jsonrpc/JsonRpcServletTest.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ public void rpcServerThrowsRuntimeException_returnsInternalError() throws Except
137137

138138
@Test
139139
public void batchRpcServerThrows_internalErrorIsArray() throws Exception {
140-
doThrow(new RuntimeException("boom")).when(mockRpcServer).handle((HttpServletRequest) any(), any());
140+
doThrow(new RuntimeException("boom")).when(mockRpcServer)
141+
.handle((HttpServletRequest) any(), any());
141142
MockHttpServletResponse resp = doPost("[{\"method\":\"eth_blockNumber\"}]");
142143
assertEquals(200, resp.getStatus());
143144
JsonNode body = MAPPER.readTree(resp.getContentAsString());
@@ -208,6 +209,7 @@ private MockHttpServletResponse doPost(String body) throws Exception {
208209
}
209210

210211
private static class TestableServlet extends JsonRpcServlet {
212+
211213
void callDoPost(HttpServletRequest req, HttpServletResponse resp) throws IOException {
212214
doPost(req, resp);
213215
}

0 commit comments

Comments
 (0)