- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 399 for Mock (0.1 seconds)
-
src/test/java/jcifs/smb1/smb1/FileEntryTest.java
void nullName() { FileEntry mock = mock(FileEntry.class); when(mock.getName()).thenReturn(null); assertNull(mock.getName()); } @Test @DisplayName("Negative length is allowed via mock") void negativeLength() { FileEntry mock = mock(FileEntry.class); when(mock.length()).thenReturn(-10L); assertEquals(-10L, mock.length());
Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 3K bytes - Click Count (0) -
build-tools-internal/src/test/groovy/org/elasticsearch/gradle/internal/test/rerun/executer/RerunTestResultProcessorTestSpec.groovy
given: def delegate = Mock(TestResultProcessor) def processor = new RerunTestResultProcessor(delegate); def testDesciptorInternal = Mock(TestDescriptorInternal); def testId = "TestId" _ * testDesciptorInternal.getId() >> testId def testStartEvent = Mock(TestStartEvent) def testOutputEvent = Mock(TestOutputEvent)Created: Wed Apr 08 16:19:15 GMT 2026 - Last Modified: Tue Jun 01 09:19:30 GMT 2021 - 4.9K bytes - Click Count (0) -
src/test/java/jcifs/smb/DfsImplTest.java
@BeforeEach void setUp() throws IOException { // Mock the CIFSContext and its dependencies mockContext = mock(CIFSContext.class); mockConfig = mock(Configuration.class); mockCredentials = mock(Credentials.class); mockTransportPool = mock(SmbTransportPool.class); // Set up mock behaviors when(mockContext.getConfig()).thenReturn(mockConfig);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 5.5K bytes - Click Count (0) -
src/test/java/jcifs/pac/kerberos/KerberosCredentialsTest.java
import org.junit.jupiter.api.Test; import org.mockito.Mock; import org.mockito.MockedConstruction; import org.mockito.Mockito; import org.mockito.MockitoAnnotations; /** * Test class for KerberosCredentials. */ class KerberosCredentialsTest { @Mock private LoginContext loginContext; @Mock private Subject subject; @Mock private KerberosKey key1; @MockCreated: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7K bytes - Click Count (0) -
src/test/java/jcifs/CIFSContextTest.java
import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.net.URLStreamHandler; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.mockito.Mock; /** * Test class for CIFSContext interface functionality */ @DisplayName("CIFSContext Tests")Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 8.8K bytes - Click Count (0) -
src/test/java/jcifs/smb/SmbTreeImplTest.java
import jcifs.internal.smb2.nego.Smb2NegotiateResponse; import jcifs.internal.smb2.tree.Smb2TreeConnectResponse; class SmbTreeImplTest { @Mock private SmbSessionImpl session; @Mock private Configuration config; @Mock private CIFSContext context; @Mock private SmbTransportImpl transport; @BeforeEach void setUp() throws Exception { MockitoAnnotations.openMocks(this);Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 7.8K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/io/FlushablesTest.java
// 'swallowException' when the mock does not throw an exception. setupFlushable(false); doFlush(mockFlushable, false, false); setupFlushable(false); doFlush(mockFlushable, true, false); } public void testFlush_flushableWithEatenException() throws IOException { // make sure that no exception is thrown if 'swallowException' is true // when the mock does throw an exception on flush.
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Wed Jul 16 20:34:52 GMT 2025 - 3.3K bytes - Click Count (0) -
src/test/java/jcifs/smb1/smb1/SmbRandomAccessFileTest.java
// Mock the transport layer smbTransport = mock(SmbTransport.class); smbTransport.rcv_buf_size = 4096; smbTransport.snd_buf_size = 4096; // Mock the session layer smbSession = mock(SmbSession.class); smbSession.transport = smbTransport; // Mock the tree layer smbTree = mock(SmbTree.class); smbTree.session = smbSession;Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 14 05:31:44 GMT 2025 - 9.3K bytes - Click Count (0) -
src/test/java/jcifs/smb1/http/NtlmHttpServletRequestTest.java
import org.mockito.Mock; import org.mockito.junit.jupiter.MockitoExtension; import jakarta.servlet.http.HttpServletRequest; @ExtendWith(MockitoExtension.class) public class NtlmHttpServletRequestTest { @Test @DisplayName("constructor stores principal and delegates properly") void testHappyPath(@Mock HttpServletRequest mockRequest, @Mock Principal mockPrincipal) {Created: Sun Apr 05 00:10:12 GMT 2026 - Last Modified: Thu Aug 21 04:51:33 GMT 2025 - 3.4K bytes - Click Count (0) -
android/guava-tests/test/com/google/common/util/concurrent/WrappingScheduledExecutorServiceTest.java
public void testSchedule() { MockExecutor mock = new MockExecutor(); TestExecutor testExecutor = new TestExecutor(mock); Future<?> unused1 = testExecutor.schedule(() -> {}, 10, MINUTES); mock.assertLastMethodCalled("scheduleRunnable", 10, MINUTES); Future<?> unused2 = testExecutor.schedule(() -> null, 5, SECONDS); mock.assertLastMethodCalled("scheduleCallable", 5, SECONDS); }
Created: Fri Apr 03 12:43:13 GMT 2026 - Last Modified: Mon Mar 16 22:45:21 GMT 2026 - 7.5K bytes - Click Count (0)