Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/test/java/org/fungover/thunder/PackageReaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ void socketReceiveResponseIfConnectMessageIsSent() throws IOException {
assertArrayEquals(connackMessage, bytesWritten);
}


@Test
@DisplayName("Socket receive no response if no valid connect message is sent")
void socketReceiveNoResponseIfNoValidConnectMessageIsSent() throws IOException {
Expand All @@ -87,7 +86,7 @@ void socketReceiveNoResponseIfNoValidConnectMessageIsSent() throws IOException {
}
@Test
@DisplayName("Should return false if double connect message is received")
void shouldReturnFalsseIfDoubleConnectMessageIsReceived() throws IOException {
void shouldReturnFalseIfDoubleConnectMessageIsReceived() throws IOException {
Socket socketMock = mock(Socket.class);
InputStream inputStream = new ByteArrayInputStream(new byte[]{0x10, 0x01, 0x00});
OutputStream outputStream = new ByteArrayOutputStream();
Expand All @@ -112,7 +111,6 @@ void shouldReturnFalseIfClientIsStillConnescted() throws IOException {
assertFalse(packageReader.isCleanDisconnect(address, new byte[]{(byte) 0xE0}, 1));
}


@Test
@DisplayName("Should return false if double connect message is received")
void shouldReturnFalseIfDoubleConnectMessageIsReceived() throws IOException {
Expand Down Expand Up @@ -160,4 +158,4 @@ void shouldReturnFalseIfPackageIsNotConnectPackage() throws IOException {
assertFalse(packageReader.isValidConnection(socketMock));
}

}
}