- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for testAutoCloseable (0.07 sec)
-
src/test/java/jcifs/SmbWatchHandleTest.java
verify(watchHandle, times(1)).close(); } /** * Test AutoCloseable behavior with try-with-resources */ @Test void testAutoCloseable() throws CIFSException { // Create a mock that tracks close calls SmbWatchHandle autoCloseableHandle = mock(SmbWatchHandle.class); when(autoCloseableHandle.watch()).thenReturn(mockNotifications);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.2K bytes - Viewed (0) -
src/test/java/jcifs/SmbTreeTest.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.2K bytes - Viewed (0) -
src/test/java/jcifs/util/SecureCredentialStorageTest.java
}, "Should throw IllegalStateException after destroy"); // Clean up Arrays.fill(plaintext, '\0'); } @Test public void testAutoCloseable() throws Exception { char[] plaintext = "AutoCloseTest".toCharArray(); SecureCredentialStorage autoStorage = null; try {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sat Aug 30 05:58:03 UTC 2025 - 12.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/NtlmPasswordAuthenticatorTest.java
} /** * Test AutoCloseable implementation */ @Test @DisplayName("Test AutoCloseable with try-with-resources") public void testAutoCloseable() { char[] testPassword = "AutoClosePass123!".toCharArray(); try (NtlmPasswordAuthenticator auth = new NtlmPasswordAuthenticator("user", testPassword)) {
Registered: 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/util/SecureKeyManagerTest.java
keyManager.close(); keyManager.close(); // Should not throw assertEquals(0, keyManager.getKeyCount(), "Should have no keys after close"); } @Test public void testAutoCloseable() throws Exception { try (SecureKeyManager manager = new SecureKeyManager()) { manager.storeSessionKey("auto-session", testKey, "AES");
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/SmbResourceTest.java
verify(mockResource).close(); } @Test @DisplayName("resource should be AutoCloseable") void testAutoCloseable() { // Given SmbResource resource = createMockResource(); // When/Then assertDoesNotThrow(() -> { try (SmbResource r = resource) {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 35K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/Smb2EncryptionContextTest.java
assertFalse(context.needsKeyRotation(), "Should not need rotation after reset"); } @Test @DisplayName("Should implement AutoCloseable and securely wipe keys on close") void testAutoCloseable() { // Given byte[] encKey = new byte[16]; byte[] decKey = new byte[16]; new SecureRandom().nextBytes(encKey); new SecureRandom().nextBytes(decKey);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Sun Aug 31 08:00:57 UTC 2025 - 44.1K bytes - Viewed (0) -
android/guava-tests/test/com/google/common/util/concurrent/AbstractClosingFutureTest.java
}, executor); assertFinallyFailsWithException(closingFuture); waitUntilClosed(closingFuture); assertClosed(closeable1, closeable2); } public void testAutoCloseable() throws Exception { AutoCloseable autoCloseable = closeable1::close; ClosingFuture<String> closingFuture = ClosingFuture.submit( new ClosingCallable<String>() { @Override
Registered: Fri Sep 05 12:43:10 UTC 2025 - Last Modified: Fri Jul 11 18:52:30 UTC 2025 - 75.4K bytes - Viewed (0)