- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 19 for mockable (0.19 seconds)
-
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) -
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) -
impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvnenc/goals/ConfiguredGoalSupport.java
import org.codehaus.plexus.components.secdispatcher.SecDispatcher; import static org.apache.maven.cling.invoker.mvnenc.EncryptInvoker.ERROR; /** * The support class for goal implementations that requires valid/workable config. */ public abstract class ConfiguredGoalSupport extends GoalSupport { protected ConfiguredGoalSupport(MessageBuilderFactory messageBuilderFactory, SecDispatcher secDispatcher) {Created: Sun Apr 05 03:35:12 GMT 2026 - Last Modified: Wed Jun 11 13:14:09 GMT 2025 - 4.2K bytes - Click Count (0)