From eaa0752285496cb3346e3953d4a48c4fbcebd2b8 Mon Sep 17 00:00:00 2001 From: hustoles <martin.hustoles@student.reutlingen-university.de> Date: Thu, 30 Nov 2023 08:14:31 +0100 Subject: [PATCH] fixed tests --- src/test/java/phy/CPClientCookieRequestTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/test/java/phy/CPClientCookieRequestTest.java b/src/test/java/phy/CPClientCookieRequestTest.java index 8b21569..e89af21 100644 --- a/src/test/java/phy/CPClientCookieRequestTest.java +++ b/src/test/java/phy/CPClientCookieRequestTest.java @@ -58,7 +58,7 @@ public class CPClientCookieRequestTest { when(phyProtocolMock.receive(anyInt())).thenReturn(testMsg); // Run the test - assertDoesNotThrow(()->cProtocol.requestCookie()); + assertDoesNotThrow(()->cProtocol.requestCookie(1)); // verify a specified behavior verify(phyProtocolMock, times(1)).receive(2000); @@ -77,7 +77,7 @@ public class CPClientCookieRequestTest { // Run the test assertThrows(CookieRequestException.class, - ()->cProtocol.requestCookie()); + ()->cProtocol.requestCookie(1)); verify(phyProtocolMock, times(1)).receive(2000); } @@ -96,7 +96,7 @@ public class CPClientCookieRequestTest { when(phyProtocolMock.receive(anyInt())).thenReturn(corruptedPhyMsg).thenReturn(testMsg); // Run the test - assertDoesNotThrow(()->cProtocol.requestCookie()); + assertDoesNotThrow(()->cProtocol.requestCookie(1)); verify(phyProtocolMock, times(2)).receive(2000); } @@ -113,7 +113,7 @@ public class CPClientCookieRequestTest { when(phyProtocolMock.receive(anyInt())).thenReturn(corruptedMsg).thenReturn(testMsg); // Run the test - assertDoesNotThrow(()->cProtocol.requestCookie()); + assertDoesNotThrow(()->cProtocol.requestCookie(1)); verify(phyProtocolMock, times(2)).receive(2000); } @@ -130,7 +130,7 @@ public class CPClientCookieRequestTest { when(phyProtocolMock.receive(anyInt())).thenReturn(corruptedMsg).thenReturn(testMsg); // Run the test - assertDoesNotThrow(()->cProtocol.requestCookie()); + assertDoesNotThrow(()->cProtocol.requestCookie(1)); verify(phyProtocolMock, times(2)).receive(anyInt()); } @@ -143,7 +143,7 @@ public class CPClientCookieRequestTest { // Run the test assertThrows(CookieRequestException.class, - ()->cProtocol.requestCookie()); + ()->cProtocol.requestCookie(1)); verify(phyProtocolMock, times(3)).receive(2000); } -- GitLab