- Sort Score
- Result 10 results
- Languages All
Results 81 - 90 of 270 for thenReturn (0.08 sec)
-
src/test/java/jcifs/smb1/smb1/NtlmChallengeTest.java
void testToStringWithValidData() { byte[] challenge = new byte[] { (byte) 0x01, (byte) 0x02, (byte) 0x03, (byte) 0xFF }; UniAddress dc = mock(UniAddress.class); when(dc.toString()).thenReturn("SERVER123"); NtlmChallenge nc = new NtlmChallenge(challenge, dc); String result = nc.toString(); // The format is: NtlmChallenge[challenge=0x<hex>,dc=<dc_string>]
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6K bytes - Viewed (0) -
src/test/java/jcifs/internal/fscc/FileInformationTest.java
// Set different levels when(basicInfo.getFileInformationLevel()).thenReturn(FileInformation.FILE_BASIC_INFO); when(standardInfo.getFileInformationLevel()).thenReturn(FileInformation.FILE_STANDARD_INFO); when(internalInfo.getFileInformationLevel()).thenReturn(FileInformation.FILE_INTERNAL_INFO); // Verify each has correct levelRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.5K bytes - Viewed (0) -
src/test/java/jcifs/smb/DirFileEntryEnumIterator1Test.java
lenient().when(tree.acquire()).thenReturn(tree); lenient().when(tree.getConfig()).thenReturn(config); lenient().when(config.getListCount()).thenReturn(10); lenient().when(config.getListSize()).thenReturn(4096); lenient().when(parent.getLocator()).thenReturn(locator); lenient().when(locator.getUNCPath()).thenReturn("\\\\SERVER\\Share\\dir\\"); // ends with \\
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 12.7K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbSessionInternalTest.java
@ParameterizedTest @DisplayName("isInUse reflects current mocked state") @ValueSource(booleans = { true, false }) void isInUse_variants(boolean inUse) { when(session.isInUse()).thenReturn(inUse); boolean result = session.isInUse(); assertEquals(inUse, result); verify(session, times(1)).isInUse(); }Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SpnegoContextTest.java
@BeforeEach void setup() { // Default: do not enforce or disable SPNEGO integrity when(this.config.isEnforceSpnegoIntegrity()).thenReturn(false); when(this.config.isDisableSpnegoIntegrity()).thenReturn(false); this.mechs = new ASN1ObjectIdentifier[] { new ASN1ObjectIdentifier("1.2.3.4") }; } private SpnegoContext newContext() {Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
impl/maven-core/src/test/java/org/apache/maven/graph/DefaultGraphBuilderTest.java
when(mavenExecutionRequest.getRootDirectory()).thenReturn(Paths.get(".")); when(mavenExecutionRequest.getProjectActivation()).thenReturn(projectActivation); when(mavenExecutionRequest.getMakeBehavior()).thenReturn(parameterMakeBehavior); when(mavenExecutionRequest.getPom()).thenReturn(parameterRequestedPom); when(mavenExecutionRequest.isRecursive()).thenReturn(parameterRecursive);Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Tue Dec 09 20:39:03 UTC 2025 - 28K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/lease/LeaseManagerTest.java
mockContext = mock(CIFSContext.class); mockConfig = mock(Configuration.class); when(mockContext.getConfig()).thenReturn(mockConfig); when(mockConfig.getLeaseTimeout()).thenReturn(30000); when(mockConfig.getMaxLeases()).thenReturn(1000); when(mockConfig.getLeaseBreakTimeout()).thenReturn(60); leaseManager = new LeaseManager(mockContext); } @AfterEach void tearDown() {
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 21 00:16:17 UTC 2025 - 13.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans2/Trans2SetFileInformationTest.java
@Test @DisplayName("Test complete wire format writing") void testCompleteWireFormatWriting() { when(mockFileInfo.getFileInformationLevel()).thenReturn((byte) FileInformation.FILE_BASIC_INFO); when(mockFileInfo.encode(any(byte[].class), anyInt())).thenReturn(50); trans2SetFileInfo = new Trans2SetFileInformation(config, TEST_FID, mockFileInfo); byte[] setupBuffer = new byte[256];Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 17.8K bytes - Viewed (0) -
src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java
void hasCapability_variousCaps_returnsTrue_andCapturesArgument(int cap) throws Exception { // Arrange: stub to return true regardless of input when(handle.hasCapability(anyInt())).thenReturn(true); // Act boolean result = handle.hasCapability(cap); // Assert: verify return and the captured argument equals input assertTrue(result);
Registered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 9.3K bytes - Viewed (0) -
src/test/java/jcifs/dcerpc/ndr/NdrShortTest.java
// Given: NdrShort and mock returning specific value int decodedValue = 200; NdrShort ndrShort = new NdrShort(0); when(mockBuffer.dec_ndr_short()).thenReturn(decodedValue); // When: Decoding the value ndrShort.decode(mockBuffer); // Then: Should call dec_ndr_short and set value correctlyRegistered: Sat Dec 20 13:44:44 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.2K bytes - Viewed (0)