- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 295 for assertThrows (0.05 sec)
-
src/test/java/jcifs/util/ServerResponseValidatorTest.java
} @Test public void testNullBuffer() throws Exception { assertThrows(SmbException.class, () -> { validator.validateBuffer(null, 100, 1024); }); } @Test public void testBufferTooSmall() throws Exception { byte[] buffer = new byte[50]; assertThrows(SmbException.class, () -> { validator.validateBuffer(buffer, 100, 1024); });Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 14.2K bytes - Viewed (0) -
src/test/java/jcifs/SidResolverTest.java
assertThrows(CIFSException.class, () -> sidResolver.resolveSids(mockContext, null, testSids)); } @Test void testResolveSids_WithNullSidsArray() throws CIFSException { doThrow(new CIFSException("SIDs array cannot be null")).when(sidResolver) .resolveSids(any(CIFSContext.class), anyString(), eq(null));Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 15.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/nego/Smb2NegotiateResponseInputValidationTest.java
package jcifs.internal.smb2.nego; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; import jcifs.Configuration; import jcifs.internal.SMBProtocolDecodingException; import jcifs.internal.smb2.Smb2Constants;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 15.8K bytes - Viewed (0) -
src/test/java/jcifs/pac/kerberos/KerberosApRequestTest.java
package jcifs.pac.kerberos; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import javax.security.auth.kerberos.KerberosKey; import org.bouncycastle.asn1.ASN1Encodable; import org.bouncycastle.asn1.ASN1EncodableVector;
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/SmbEnumerationUtilTest.java
// Intent: null root is invalid input assertThrows(NullPointerException.class, () -> SmbEnumerationUtil.list(null, "*", 0, null, null)); } @Test @DisplayName("listFiles with null root throws NullPointerException") void listFiles_withNullRoot_throwsNpe() { // Intent: null root is invalid inputRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.1K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionImplTest.java
SmbSessionImpl session = newSession(); // No encryption context -> throws CIFSException notEnabled = assertThrows(CIFSException.class, () -> session.encryptMessage(new byte[] { 1 })); assertTrue(notEnabled.getMessage().contains("Encryption not enabled")); assertThrows(CIFSException.class, () -> session.decryptMessage(new byte[] { 1 })); // Set encryption context and verify delegation
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/util/SimpleCircuitBreakerTest.java
@Test @DisplayName("Test invalid configuration") void testInvalidConfiguration() { assertThrows(IllegalArgumentException.class, () -> new SimpleCircuitBreaker("invalid", 0, 2, 100)); assertThrows(IllegalArgumentException.class, () -> new SimpleCircuitBreaker("invalid", 3, 0, 100)); assertThrows(IllegalArgumentException.class, () -> new SimpleCircuitBreaker("invalid", 3, 2, -1)); } @TestRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 10.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/SIDTest.java
// Act + Assert SmbException ex = assertThrows(SmbException.class, () -> new SID(bad)); assertTrue(ex.getMessage().contains("Bad textual SID format")); } @Test @DisplayName("Textual constructor null throws NullPointerException") void testTextualConstructorNull() { assertThrows(NullPointerException.class, () -> new SID((String) null)); }Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 15.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTest.java
// Close the authenticator auth.close(); // All these operations should throw IllegalStateException assertThrows(IllegalStateException.class, () -> auth.getPassword()); assertThrows(IllegalStateException.class, () -> auth.getPasswordAsCharArray()); assertThrows(IllegalStateException.class, () -> { // This would normally be called during authenticationRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 23.3K bytes - Viewed (0) -
src/test/java/jcifs/netbios/SessionRequestPacketTest.java
import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; import java.io.ByteArrayInputStream; import java.io.IOException; import java.util.stream.Stream;
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0)