- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 18 for mockable (0.46 seconds)
The search processing time has exceeded the limit. The displayed results may be partial.
-
src/test/java/jcifs/smb1/smb1/SmbComSessionSetupAndXTest.java
private SmbComSessionSetupAndX setupAndX; @BeforeEach void setUp() throws Exception { MockitoAnnotations.openMocks(this); // Create a real ServerData instance as it's not mockable (inner class) SmbTransport.ServerData serverData = mockTransport.new ServerData(); serverData.security = ServerMessageBlock.SECURITY_USER; serverData.encryptedPasswords = true;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 4.5K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/Lockable.kt
* `wait()` and `notify()` functions. * * The Lockable interface is particularly handy because it ensures we lock the right `this` when * there are multiple `this` objects in scope. */ interface Lockable internal inline fun Lockable.wait() = (this as Object).wait() internal inline fun Lockable.notify() = (this as Object).notify() internal inline fun Lockable.notifyAll() = (this as Object).notifyAll()
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed May 28 23:28:25 GMT 2025 - 2.1K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbFileOutputStreamTest.java
// Mock for ensureOpen to reopen file when(mockFile.openUnshared(anyInt(), anyInt(), anyInt(), anyInt(), anyInt())).thenReturn(mockFileHandle); when(mockTreeHandle.send(any(Smb2WriteRequest.class), any())).thenReturn(mockWriteResponse); when(mockWriteResponse.getCount()).thenReturn(1); outputStream = new SmbFileOutputStream(mockFile, mockTreeHandle, mockFileHandle,Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 15.8K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbFileFilterTest.java
class HappyPath { @Test void acceptWithMockedFile() throws Exception { SmbFile mockFile = mock(SmbFile.class); when(mockFile.getPath()).thenReturn("/share/file.txt"); assertTrue(ALWAYSACTIVE.accept(mockFile)); } } @Nested @DisplayName("Invalid input – null file handling") class InvalidPath { @TestCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 3.2K bytes - Click Count (0) -
src/test/java/jcifs/smb/DosFileFilterTest.java
dosFileFilter = new DosFileFilter("*.*", filterAttributes); // and a mock SmbFile with specific attributes when(mockFile.getAttributes()).thenReturn(fileAttributes); // When the accept method is called boolean result = dosFileFilter.accept(mockFile); // Then the result should be as expected if (expectedResult) { assertTrue(result, "File should be accepted");
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 6.2K bytes - Click Count (0) -
internal/pubsub/pubsub.go
var GetByteBuffer = func() []byte { return make([]byte, 0, 4096) } // Sub - subscriber entity. type Sub[T Maskable] struct { ch chan T types Mask filter func(entry T) bool } // PubSub holds publishers and subscribers type PubSub[T Maskable, M Maskable] struct { // atomics, keep at top: types uint64 numSubscribers int32 maxSubscribers int32 // not atomics:
Created: Sun Apr 05 19:28:12 GMT 2026 - Last Modified: Tue Feb 06 16:57:30 GMT 2024 - 5.2K bytes - Click Count (0) -
src/test/java/jcifs/tests/persistent/HandleInfoTest.java
HandleInfo info = new HandleInfo("/test/file.txt", testGuid, testFileId, HandleType.DURABLE_V2, 120000, null); assertNull(info.getFile()); Object mockFile = new Object(); info.setFile(mockFile); assertEquals(mockFile, info.getFile()); } @Test public void testToString() {
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 4.6K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbFileInputStreamTest.java
import jcifs.internal.smb2.io.Smb2ReadResponse; @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) class SmbFileInputStreamTest { @Mock SmbFile mockFile; @Mock SmbTreeHandleImpl mockTree; @Mock SmbFileHandleImpl mockHandle; @Mock Configuration mockConfig; private SmbFileInputStream newStream() throws SmbException {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 07:14:38 GMT 2025 - 12.8K bytes - Click Count (0) -
src/test/java/jcifs/SmbResourceTest.java
assertEquals(1, shareSecurity.length, "Should return expected number of ACEs"); assertSame(mockACE, security1[0], "Should return expected ACE"); assertSame(mockACE, security2[0], "Should return expected ACE"); assertSame(mockACE, shareSecurity[0], "Should return expected ACE"); } } @Nested @DisplayName("JCIFS Specification Compliance Tests")
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 35K bytes - Click Count (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Writer.kt
*/ package okhttp3.internal.http2 import java.io.Closeable import java.io.IOException import java.util.logging.Level.FINE import java.util.logging.Logger import okhttp3.internal.concurrent.Lockable import okhttp3.internal.concurrent.withLock import okhttp3.internal.format import okhttp3.internal.http2.Http2.CONNECTION_PREFACE import okhttp3.internal.http2.Http2.FLAG_ACK
Created: Fri Apr 03 11:42:14 GMT 2026 - Last Modified: Wed May 28 23:28:25 GMT 2025 - 11K bytes - Click Count (0)