- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 124 for throwing (2.1 sec)
-
src/test/java/jcifs/SmbTreeHandleTest.java
* Verifies that the close method can be called without throwing an exception. * @throws CIFSException */ @Test void testClose() throws CIFSException { smbTreeHandle.close(); // Verify that close() was called on the mock verify(smbTreeHandle).close(); } /** * Test for close() method throwing CIFSException.Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.1K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/TransportExceptionTest.java
} @Test @DisplayName("Test exception can be thrown and caught") public void testThrowAndCatch() { // Test throwing and catching with message String expectedMessage = "Transport failed"; assertThrows(TransportException.class, () -> { throw new TransportException(expectedMessage); }); // Test throwing and catching with causeRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 7.4K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/DcerpcSecurityProviderTest.java
MockitoAnnotations.openMocks(this); } @Test void testWrapMethodIsCalled() throws DcerpcException { // Test that the wrap method can be called without throwing an exception dcerpcSecurityProvider.wrap(mockNdrBuffer); // Verify that the wrap method was called exactly once with the mockNdrBuffer verify(dcerpcSecurityProvider, times(1)).wrap(mockNdrBuffer);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 2.5K bytes - Viewed (0) -
src/test/java/jcifs/smb1/dcerpc/msrpc/MsrpcSamrConnect2Test.java
* <p> * The class under test is a simple wrapper around the base class that * sets internal fields in its constructor. * These tests verify that the constructor accepts various parameters * without throwing exceptions. */ @ExtendWith(MockitoExtension.class) class MsrpcSamrConnect2Test { // Helper method to create a minimal SamrPolicyHandle instance. private static SamrPolicyHandle createMockPolicyHandle() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/http/NtlmHttpServletRequestTest.java
} @Test @DisplayName("constructor accepts null principal") void testConstructorWithNullPrincipal(@Mock HttpServletRequest mockRequest) { // Constructor accepts null principal without throwing exception NtlmHttpServletRequest request = new NtlmHttpServletRequest(mockRequest, null); // getRemoteUser() will throw NPE when trying to call getName() on null principalRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 04:51:33 UTC 2025 - 3.4K bytes - Viewed (0) -
src/main/java/org/codelibs/core/exception/NullArgumentException.java
*/ package org.codelibs.core.exception; import static org.codelibs.core.collection.ArrayUtil.asArray; /** * Exception thrown when an argument is null. * * Intended to be used instead of throwing {@link NullPointerException}. * * @author wyukawa */ public class NullArgumentException extends ClIllegalArgumentException { /** * */Registered: Sat Dec 20 08:55:33 UTC 2025 - Last Modified: Thu Jun 19 09:12:22 UTC 2025 - 1.3K bytes - Viewed (0) -
src/main/java/jcifs/SmbTransportPool.java
* specified by the <code>UniAddress</code> parameter. If the credentials are * not accepted, an <code>SmbAuthException</code> will be thrown. If an error * occurs an <code>SmbException</code> will be thrown. If the credentials are * valid, the method will return without throwing an exception. See the * last <a href="../../../faq.html">FAQ</a> question. * <p>
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Sat Aug 16 01:32:48 UTC 2025 - 7.5K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/TransWaitNamedPipeResponseTest.java
* Verify that all methods can be called with null buffers without * throwing exceptions. This test ensures robustness of the implementation. */ @Test void methodsHandleNullBuffersGracefully() { // Arrange TransWaitNamedPipeResponse resp = new TransWaitNamedPipeResponse(); // Act & Assert - no exceptions should be thrown assertDoesNotThrow(() -> resp.writeSetupWireFormat(null, 0));Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 5.4K bytes - Viewed (0) -
src/test/java/jcifs/spnego/SpnegoExceptionTest.java
// Then assertNotNull(ex); assertEquals(message, ex.getMessage()); assertEquals(cause, ex.getCause()); } @Test @DisplayName("Should handle null message and/or cause without throwing") void testNullInputs() { assertDoesNotThrow(() -> { SpnegoException ex1 = new SpnegoException((String) null); assertNotNull(ex1); assertNull(ex1.getMessage());Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.9K bytes - Viewed (0) -
src/test/java/jcifs/internal/SMBProtocolDecodingExceptionTest.java
// Assert throwing/catching behavior with assertThrows SMBProtocolDecodingException thrown = assertThrows(SMBProtocolDecodingException.class, () -> { throw new SMBProtocolDecodingException(); }, "Should be throwable via assertThrows"); assertTrue(thrown instanceof CIFSException, "Thrown instance should also be CIFSException subtype"); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 5.1K bytes - Viewed (0)