Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 47 of 47 for thenThrow (0.04 sec)

  1. src/test/java/jcifs/dcerpc/DcerpcPipeHandleTest.java

                DcerpcPipeHandle handle = createMockedDcerpcPipeHandle();
                CIFSException exception = new CIFSException("Test exception");
                when(mockSmbPipeHandleInternal.getSessionKey()).thenThrow(exception);
                assertThrows(CIFSException.class, handle::getSessionKey);
            }
        }
    
        @Nested
        @DisplayName("Send/Receive Fragment Tests")
        class SendReceiveFragmentTests {
    
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 21K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/create/CreateContextResponseTest.java

                CreateContextResponse response = mock(CreateContextResponse.class);
                byte[] buffer = new byte[100];
                when(response.decode(any(byte[].class), anyInt(), anyInt())).thenThrow(new SMBProtocolDecodingException("Test error"));
    
                assertThrows(SMBProtocolDecodingException.class, () -> response.decode(buffer, 0, 10));
            }
        }
    
        @Nested
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.2K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java

        void nameFilterThrowsIsHandled() throws Exception {
            // Arrange
            stubAcquireReturnsSelf();
            when(nameFilter.accept(parent, "bad")).thenThrow(new CIFSException("bad name"));
            when(nameFilter.accept(parent, "good")).thenReturn(true);
    
            FileEntry initial = entry("first");
            FileEntry[] page1 = new FileEntry[] { entry("bad"), entry("good") };
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 14.5K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/AllocInfoTest.java

                // Given
                byte[] buffer = new byte[100];
                when(mockAllocInfo.decode(any(byte[].class), anyInt(), anyInt()))
                        .thenThrow(new jcifs.internal.SMBProtocolDecodingException("Test error"));
    
                // When & Then
                assertThrows(jcifs.internal.SMBProtocolDecodingException.class, () -> mockAllocInfo.decode(buffer, 0, buffer.length));
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.8K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/create/CreateContextRequestTest.java

            void testEncodeWithException() {
                CreateContextRequest request = mock(CreateContextRequest.class);
                byte[] buffer = new byte[100];
                when(request.encode(any(byte[].class), anyInt())).thenThrow(new RuntimeException("Test error"));
    
                assertThrows(RuntimeException.class, () -> request.encode(buffer, 0));
            }
        }
    
        @Nested
        @DisplayName("Test Implementation Tests")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 24.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/SMB1SigningDigestTest.java

            when(mockContext.getConfig()).thenReturn(mockConfig);
            when(mockConfig.getLanManCompatibility()).thenReturn(3);
            when(mockTransport.getServerEncryptionKey()).thenThrow(new RuntimeException("Test exception"));
    
            assertThrows(SmbException.class, () -> new SMB1SigningDigest(mockTransport, mockAuth));
        }
    
        @Test
        @DisplayName("Test update method with valid data")
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/NbtAddressTest.java

            nbtAddress.calledName = NbtAddress.SMBSERVER_NAME; // Manually set for this test case
    
            when(mockNameServiceClient.getNodeStatus(nbtAddress)).thenThrow(new UnknownHostException());
    
            assertNull(nbtAddress.nextCalledName(mockContext));
            verify(mockNameServiceClient).getNodeStatus(nbtAddress);
        }
    
        @Test
    Registered: Sat Dec 20 13:44:44 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.4K bytes
    - Viewed (0)
Back to top