- Sort Score
- Result 10 results
- Languages All
Results 111 - 120 of 239 for thenReturn (0.24 sec)
-
src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryResponseTest.java
private Smb2QueryDirectoryResponse response; @BeforeEach void setUp() { MockitoAnnotations.openMocks(this); when(mockConfig.isUseUnicode()).thenReturn(true); when(mockConfig.getMaximumBufferSize()).thenReturn(65536); } @Test @DisplayName("Test constructor initializes with config and expectInfoClass") void testConstructor() {Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 23.5K bytes - Viewed (0) -
src/test/java/jcifs/context/CIFSContextCredentialWrapperTest.java
mockedNtlmAuthenticator.when(NtlmAuthenticator::getDefault).thenReturn(mockNtlmAuthenticator); mockedNtlmAuthenticator.when(() -> NtlmAuthenticator.requestNtlmPasswordAuthentication(eq(mockNtlmAuthenticator), eq("locationHint"), eq((SmbAuthException) null))).thenReturn(mockNtlmPasswordAuthenticator); // Perform the renewal
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 11.4K bytes - Viewed (0) -
src/test/java/jcifs/internal/SmbNegotiationRequestTest.java
} @Test @DisplayName("Test multiple calls to isSigningEnforced") void testMultipleCallsToIsSigningEnforced() { // Given when(negotiationRequest.isSigningEnforced()).thenReturn(true).thenReturn(false).thenReturn(true); // When & Then assertTrue(negotiationRequest.isSigningEnforced(), "First call should return true");Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.4K bytes - Viewed (0) -
src/test/java/jcifs/netbios/NbtAddressTest.java
when(mockNetbiosAddress20.getNameType()).thenReturn(0x20); when(mockNetbiosAddress20.getHostName()).thenReturn("ACTUAL_SERVER_NAME"); NetbiosAddress[] nodeStatusResponse = { mock(NetbiosAddress.class), mockNetbiosAddress20 }; when(mockNameServiceClient.getNodeStatus(nbtAddress)).thenReturn(nodeStatusResponse);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 20.4K bytes - Viewed (0) -
src/test/java/jcifs/smb/DosFileFilterTest.java
// Given a DosFileFilter with specific attributes 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) {Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 6.2K bytes - Viewed (0) -
src/test/java/jcifs/internal/RequestTest.java
when(request.isResponseAsync()).thenReturn(true); when(request.getNext()).thenReturn(nextRequest); when(request.split()).thenReturn(nextRequest); when(request.allowChain(nextRequest)).thenReturn(true); when(request.createCancel()).thenReturn(nextRequest); when(request.size()).thenReturn(1024); when(request.getOverrideTimeout()).thenReturn(5000); // When & Then
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 14.5K bytes - Viewed (0) -
src/test/java/jcifs/util/transport/RequestTest.java
when(mockRequest.isCancel()).thenReturn(true); assertTrue(mockRequest.isCancel(), "isCancel should return true when mocked to do so."); verify(mockRequest, times(1)).isCancel(); } @Test void testIsCancelFalse() { // Test case for isCancel method when it returns false when(mockRequest.isCancel()).thenReturn(false);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 3.6K bytes - Viewed (0) -
src/test/java/jcifs/smb1/smb1/SmbComSessionSetupAndXTest.java
mockAuth.password = "testpass"; when(mockAuth.getAnsiHash(any(byte[].class))).thenReturn(new byte[24]); when(mockAuth.getUnicodeHash(any(byte[].class))).thenReturn(new byte[24]); when(mockAuth.getName()).thenReturn("testuser"); when(mockAuth.getDomain()).thenReturn("TESTDOMAIN"); setupAndX = new SmbComSessionSetupAndX(mockSession, mockAndx, mockAuth); } @Test
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 4.5K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb1/trans/nt/SmbComNtCancelTest.java
class ConstructorTests { private Configuration mockConfig; @BeforeEach void setUp() { mockConfig = mock(Configuration.class); when(mockConfig.getPid()).thenReturn(12345); } @Test @DisplayName("Should initialize with correct command and MID") void testConstructorInitialization() throws Exception { // GivenRegistered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 07:14:38 UTC 2025 - 12.8K bytes - Viewed (0) -
src/test/java/jcifs/internal/smb2/info/Smb2QueryDirectoryRequestTest.java
when(mockConfig.getMaximumBufferSize()).thenReturn(8192); when(mockConfig.getListSize()).thenReturn(16384); request = new Smb2QueryDirectoryRequest(mockConfig); assertNotNull(request); // Test with smaller list size when(mockConfig.getMaximumBufferSize()).thenReturn(16384); when(mockConfig.getListSize()).thenReturn(8192);
Registered: Sun Sep 07 00:10:21 UTC 2025 - Last Modified: Thu Aug 14 05:31:44 UTC 2025 - 13.2K bytes - Viewed (0)