- Sort Score
- Result 10 results
- Languages All
Results 101 - 110 of 2,385 for When (0.07 sec)
-
src/test/java/jcifs/NameServiceClientTest.java
import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.net.InetAddress; import java.net.UnknownHostException; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockitoAnnotations;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionImplTest.java
when(resp.getSessionId()).thenReturn(42L); session.setSessionSetup(resp); when(transport.isDisconnected()).thenReturn(false); when(transport.isFailed()).thenReturn(false); assertTrue(session.isConnected()); assertFalse(session.isFailed()); when(transport.isDisconnected()).thenReturn(true); when(transport.isFailed()).thenReturn(true);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbRandomAccessFileTest.java
when(file.ensureTreeConnected()).thenReturn(tree); when(tree.getConfig()).thenReturn(cfg); when(tree.getReceiveBufferSize()).thenReturn(1024); when(tree.getSendBufferSize()).thenReturn(1024); when(tree.hasCapability(anyInt())).thenAnswer(inv -> ntSmbsCap && inv.getArgument(0).equals(SmbConstants.CAP_NT_SMBS)); when(tree.areSignaturesActive()).thenReturn(false);Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 18.1K bytes - Viewed (0) -
src/test/java/jcifs/pac/kerberos/KerberosRelevantAuthDataTest.java
*/ @Test void testConstructor_EmptyToken() { // 1. GIVEN byte[] emptyToken = new byte[0]; Map<Integer, KerberosKey> keys = new HashMap<>(); // 2. WHEN & 3. THEN // When ASN1InputStream.readObject() returns null due to empty input, // ASN1Util.as() throws NullPointerException (not wrapped) Exception exception = assertThrows(Exception.class, () -> {Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9K bytes - Viewed (0) -
src/test/java/jcifs/internal/TreeConnectResponseTest.java
} @Test @DisplayName("Should return tree ID") void testGetTid() { // Given when(mockResponse.getTid()).thenReturn(12345); // When int tid = mockResponse.getTid(); // Then assertEquals(12345, tid, "Should return the configured tree ID"); verify(mockResponse).getTid(); } @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 24.9K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbComTreeDisconnectTest.java
*/ class SmbComTreeDisconnectTest { /** * Test the constructor of SmbComTreeDisconnect. */ @Test void testConstructor() { // When SmbComTreeDisconnect smbComTreeDisconnect = new SmbComTreeDisconnect(); // Then assertEquals(ServerMessageBlock.SMB_COM_TREE_DISCONNECT, smbComTreeDisconnect.command, "Command should be SMB_COM_TREE_DISCONNECT"); } /**Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.8K bytes - Viewed (0) -
src/test/java/jcifs/smb1/https/HandlerTest.java
void testDefaultConstructor() { // When Handler testHandler = new Handler(); // Then assertNotNull(testHandler); } @Test @DisplayName("Should extend jcifs.smb1.http.Handler") void testInheritance() { // Then assertTrue(handler instanceof jcifs.smb1.http.Handler);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/io/Smb2FlushResponseTest.java
} @Test @DisplayName("Constructor should initialize with Configuration") void testConstructor() { // Given & When Smb2FlushResponse flushResponse = new Smb2FlushResponse(mockConfig); // Then assertNotNull(flushResponse); // Cannot test getConfig() as it's protected } @Nested @DisplayName("writeBytesWireFormat tests")Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 10.3K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java
verifyNoMoreInteractions(handle); } @Test @DisplayName("ensureDFSResolved(): throws CIFSException when underlying call fails") void ensureDFSResolved_throws() throws Exception { // Arrange: configure the mock to throw doThrow(new CIFSException("DFS resolution failed")).when(handle).ensureDFSResolved(); // Act + Assert: exception is propagated with message
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/netbios/SessionRequestPacketTest.java
void testConstructorWithNetbiosNames() { when(mockCalledName.getName()).thenReturn("SERVER"); when(mockCalledName.getNameType()).thenReturn(0x20); when(mockCalledName.getScope()).thenReturn(null); when(mockCallingName.getName()).thenReturn("CLIENT"); when(mockCallingName.getNameType()).thenReturn(0x00); when(mockCallingName.getScope()).thenReturn(null);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0)