Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,855 for thrown (0.04 sec)

  1. src/test/java/jcifs/dcerpc/msrpc/LsaPolicyHandleTest.java

            // Now, mock the behavior for MsrpcLsarClose to throw IOException
            doThrow(new IOException("Close network error")).when(mockDcerpcHandle).sendrecv(any(MsrpcLsarClose.class));
    
            // Act & Assert
            IOException thrown = assertThrows(IOException.class, () -> {
                handle.close();
            });
    
            assertEquals("Close network error", thrown.getMessage());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/pac/PacUnicodeStringTest.java

            String testString = "not-null";
    
            // Expect a PACDecodingException to be thrown
            PACDecodingException exception = assertThrows(PACDecodingException.class, () -> {
                pacString.check(testString);
            }, "A PACDecodingException should be thrown for a non-empty string with a zero pointer.");
    
            // Verify the exception message
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.7K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb1/dcerpc/msrpc/LsaPolicyHandleTest.java

            // Now, mock the behavior for MsrpcLsarClose to throw IOException
            doThrow(new IOException("Close network error")).when(mockDcerpcHandle).sendrecv(any(MsrpcLsarClose.class));
    
            // Act & Assert
            IOException thrown = assertThrows(IOException.class, () -> {
                handle.close();
            });
    
            assertEquals("Close network error", thrown.getMessage());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/msrpc/SamrDomainHandleTest.java

            // Act & Assert
            SmbException thrown = assertThrows(SmbException.class, handle::close);
            assertEquals(errorCode, thrown.getNtStatus());
            verify(mockDcerpcHandle, times(1)).sendrecv(any(MsrpcSamrOpenDomain.class));
            verify(mockDcerpcHandle, times(1)).sendrecv(any(MsrpcSamrCloseHandle.class));
        }
    
        @Test
        void close_shouldThrowIOExceptionOnSendRecvFailure() throws IOException {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  5. src/test/java/jcifs/pac/kerberos/KerberosAuthDataTest.java

        private Map<Integer, KerberosKey> mockKeys;
    
        /**
         * Test parsing with an unknown auth type.
         * Expects an empty list of authorizations.
         * @throws PACDecodingException should not be thrown
         */
        @Test
        void testParseUnknownAuthType() throws PACDecodingException {
            // GIVEN an unknown auth type
            int unknownAuthType = -1;
            byte[] emptyToken = new byte[0];
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 2.7K bytes
    - Viewed (0)
  6. android/guava-testlib/src/com/google/common/testing/TearDown.java

       * not fail a test when an exception is thrown from one of its {@link TearDown} instances, but
       * this is subject to change. Also, {@code junit4.TearDownTestCase} will.
       *
       * @throws Exception for any reason. {@code TearDownTestCase} ensures that any exception thrown
       *     will not interfere with other TearDown operations.
       */
      void tearDown() throws Exception;
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Sat Dec 21 14:50:24 UTC 2024
    - 1.8K bytes
    - Viewed (0)
  7. android/guava-tests/test/com/google/common/io/CloseablesTest.java

        // make sure that no exception is thrown if 'swallowException' is true
        // when the mock does throw an exception.
        setupCloseable(true);
        doClose(mockCloseable, true);
      }
    
      public void testClose_closeableWithThrownException() throws IOException {
        // make sure that the exception is thrown if 'swallowException' is false
        // when the mock does throw an exception.
    Registered: Fri Sep 05 12:43:10 UTC 2025
    - Last Modified: Thu Dec 19 18:03:30 UTC 2024
    - 4.1K bytes
    - Viewed (0)
  8. src/test/java/jcifs/dcerpc/msrpc/SamrPolicyHandleTest.java

            doThrow(expectedException).when(mockHandle).sendrecv(any(MsrpcSamrConnect4.class));
    
            DcerpcException thrown = assertThrows(DcerpcException.class, () -> {
                new SamrPolicyHandle(mockHandle, server, access);
            });
    
            assertEquals(expectedException, thrown);
            verify(mockHandle, times(1)).sendrecv(any(MsrpcSamrConnect4.class));
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.4K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/SmbUnsupportedOperationExceptionTest.java

            RuntimeException thrown = assertThrows(RuntimeException.class, supplier::get);
            assertInstanceOf(SmbUnsupportedOperationException.class, thrown.getCause());
            assertEquals("boom", thrown.getCause().getMessage());
            verify(supplier, times(1)).get();
            verifyNoMoreInteractions(supplier);
        }
    
        @Test
        @DisplayName("No collaborator interaction occurs if exception is thrown beforehand")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  10. src/test/java/jcifs/netbios/SessionRetargetResponsePacketTest.java

            byte[] buffer = new byte[6];
    
            // Assert that an IOException is thrown with the expected message.
            IOException thrown = assertThrows(IOException.class, () -> {
                packet.readTrailerWireFormat(mockInputStream, buffer, 0);
            });
            assertTrue(thrown.getMessage().contains("unexpected EOF reading netbios retarget session response"));
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
Back to top