Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for testClose_throwsCIFSException (3.14 sec)

  1. src/test/java/jcifs/SmbTreeHandleTest.java

        /**
         * Test for close() method throwing CIFSException.
         * Verifies that the method correctly throws a CIFSException when configured to do so.
         * @throws CIFSException
         */
        @Test
        void testClose_throwsCIFSException() throws CIFSException {
            doThrow(new CIFSException("Test Exception")).when(smbTreeHandle).close();
            assertThrows(CIFSException.class, () -> smbTreeHandle.close(), "close() should throw CIFSException");
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/SmbFileHandleTest.java

            verify(smbFileHandle, times(1)).close();
        }
    
        /**
         * Test close() when a CIFSException is thrown.
         *
         * @throws CIFSException
         */
        @Test
        void testClose_throwsCIFSException() throws CIFSException {
            doThrow(new CIFSException("Failed to close")).when(smbFileHandle).close();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.1K bytes
    - Viewed (0)
Back to top