Use hasSize() assertion in favor of length checks

See gh-17874
This commit is contained in:
dreis2211
2019-08-15 09:36:29 +02:00
committed by Stephane Nicoll
parent 04b63cda8f
commit d4affd7f85
17 changed files with 36 additions and 37 deletions

View File

@@ -75,7 +75,7 @@ class FrameTests {
ByteArrayOutputStream bos = new ByteArrayOutputStream();
frame.write(bos);
byte[] bytes = bos.toByteArray();
assertThat(bytes.length).isEqualTo(130);
assertThat(bytes).hasSize(130);
assertThat(bytes[0]).isEqualTo((byte) 0x81);
assertThat(bytes[1]).isEqualTo((byte) 0x7E);
assertThat(bytes[2]).isEqualTo((byte) 0x00);