- Sort Score
- Result 10 results
- Languages All
Results 61 - 70 of 145 for simulate (0.09 sec)
-
src/test/java/jcifs/smb/SmbTransportInternalTest.java
boolean result = transport.hasCapability(cap); assertEquals(cap >= 0, result); verify(transport, times(1)).hasCapability(cap); } // Invalid input: simulate underlying SmbException when capability check fails @Test @DisplayName("hasCapability throws SmbException when underlying error occurs") void hasCapability_throws() throws SmbException {
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.1K 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/internal/smb2/multichannel/MultiChannelIntegrationTest.java
ChannelInfo channel = new ChannelInfo("failover-test", mockTransport, nic, nic); channel.setState(ChannelState.ESTABLISHED); // Simulate failure IOException failure = new IOException("Connection lost"); failover.handleFailure(channel, failure); // Verify channel state changed assertFalse(channel.isHealthy());
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 21 11:13:46 UTC 2025 - 8.2K bytes - Viewed (0) -
src/test/java/org/codelibs/fess/dict/mapping/CharMappingItemTest.java
CharMappingItem item = new CharMappingItem(1L, new String[] { "temp" }, "output") { @Override public String getInputsValue() { // Simulate null inputs scenario if (getInputs() == null) { return super.getInputsValue(); } return super.getInputsValue(); } };
Registered: Thu Sep 04 12:52:25 UTC 2025 - Last Modified: Tue Aug 19 14:09:36 UTC 2025 - 12.2K bytes - Viewed (0) -
src/test/java/jcifs/http/NtlmHttpURLConnectionTest.java
import jcifs.config.PropertyConfiguration; import jcifs.context.BaseContext; import jcifs.smb.NtlmPasswordAuthentication; /** * Tests for the NtlmHttpURLConnection class. * This class uses Mockito to simulate the behavior of HttpURLConnection and other dependencies. */ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) class NtlmHttpURLConnectionTest { @Mock
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.6K bytes - Viewed (0) -
src/test/java/jcifs/smb/DirFileEntryEnumIteratorBaseTest.java
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.5K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/ConnectionCoalescingTest.kt
// Simulate a stale connection in the pool. connection.get()!!.socket().close() val sanUrl = url.newBuilder().host("san.com").build() assert200Http2Response(execute(sanUrl), "san.com") assertThat(client.connectionPool.connectionCount()).isEqualTo(1) } /** * This is an extraordinary test case. Here's what it's trying to simulate.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jun 19 11:44:16 UTC 2025 - 19.1K bytes - Viewed (0) -
src/test/java/jcifs/ntlmssp/NtlmMessageTest.java
} @Test void testReadSecurityBuffer() { // Test readSecurityBuffer byte[] data = new byte[20]; byte[] content = "Hello".getBytes(); // Simulate a security buffer structure: length (2 bytes), length (2 bytes), offset (4 bytes) // Length = 5, Offset = 8 ByteBuffer buffer = ByteBuffer.wrap(data).order(ByteOrder.LITTLE_ENDIAN);
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/smb/SmbEnumerationUtilTest.java
// Host is empty -> triggers master browser path URL anyUrlWithEmptyHost = new URL("file:/"); when(locator.getURL()).thenReturn(anyUrlWithEmptyHost); // Simulate failure to find master browser (UnknownHost wrapped in CIFSException) when(locator.getAddress()).thenThrow(new CIFSException("no master", new UnknownHostException("MB")));
Registered: 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/SmbTreeConnectionTraceTest.java
CIFSContext ctx = mock(CIFSContext.class); SmbTreeConnectionTrace trace = Mockito.spy(new SmbTreeConnectionTrace(ctx)); // Act: directly invoke finalize to simulate GC finalization path trace.finalize(); // Assert: verify that finalize delegated to checkRelease() verify(trace, times(1)).checkRelease(); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 8.7K bytes - Viewed (0)