Search Options

Results per page
Sort
Preferred Languages
Advance

Results 161 - 170 of 239 for thenReturn (0.06 sec)

  1. src/test/java/jcifs/FileNotifyInformationTest.java

                when(mockFileNotifyInfo.getFileName()).thenReturn(fileName);
                assertEquals(fileName, mockFileNotifyInfo.getFileName());
            }
    
            @Test
            @DisplayName("Test getFileName with null value")
            void testGetFileNameWithNull() {
                when(mockFileNotifyInfo.getFileName()).thenReturn(null);
                assertNull(mockFileNotifyInfo.getFileName());
            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 18.1K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb1/com/SmbComQueryInformationTest.java

        private SmbComQueryInformation cmd;
    
        @BeforeEach
        void setUp() {
            // Configure the mock to return the OEM encoding which is required for writeString
            when(mockConfig.getOemEncoding()).thenReturn("windows-1252");
            cmd = new SmbComQueryInformation(mockConfig, "testfile.txt");
        }
    
        @Test
        @DisplayName("writeBytesWireFormat writes the command byte followed by the null terminated string")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/ioctl/SrvCopychunkCopyTest.java

                // Simulate different encode return values
                when(mockChunk1.encode(any(byte[].class), anyInt())).thenReturn(20);
                when(mockChunk2.encode(any(byte[].class), anyInt())).thenReturn(24);
                when(mockChunk3.encode(any(byte[].class), anyInt())).thenReturn(22);
    
                SrvCopychunkCopy copy = new SrvCopychunkCopy(sourceKey, mockChunk1, mockChunk2, mockChunk3);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 23.1K bytes
    - Viewed (0)
  4. src/test/java/jcifs/dcerpc/DcerpcHandleTest.java

        @BeforeEach
        void setUp() {
            // Setup buffer cache mocks with lenient stubbing
            lenient().when(mockContext.getBufferCache()).thenReturn(mockBufferCache);
            lenient().when(mockBufferCache.getBuffer()).thenReturn(new byte[8192]);
            handle = new TestDcerpcHandle(mockContext, mockBinding);
        }
    
        @Nested
        @DisplayName("Binding Parsing Tests")
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 15.3K bytes
    - Viewed (0)
  5. src/test/java/jcifs/internal/smb2/multichannel/ChannelFailoverTest.java

            failedChannel = new ChannelInfo("failed-channel", mockTransport, localInterface, remoteInterface);
            failedChannel.setState(ChannelState.ESTABLISHED);
    
            when(mockChannelManager.getLoadBalancer()).thenReturn(mockLoadBalancer);
        }
    
        @Test
        void testHandleFailure() {
            IOException error = new IOException("Connection failed");
    
            failover.handleFailure(failedChannel, error);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 21 11:13:46 UTC 2025
    - 7.7K bytes
    - Viewed (0)
  6. src/test/java/jcifs/internal/smb1/trans/nt/SmbComNtTransactionResponseTest.java

        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockConfig.getPid()).thenReturn(1234);
            when(mockConfig.getMaximumBufferSize()).thenReturn(65535);
            when(mockConfig.getMinimumVersion()).thenReturn(DialectVersion.SMB1);
            when(mockConfig.getMaximumVersion()).thenReturn(DialectVersion.SMB311);
            response = new TestSmbComNtTransactionResponse(mockConfig);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 16.3K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/NameTest.java

            NetbiosName mockNetbiosName = mock(NetbiosName.class);
            when(mockNetbiosName.getName()).thenReturn("MOCKNAME");
            when(mockNetbiosName.getNameType()).thenReturn(0x20);
            when(mockNetbiosName.getScope()).thenReturn("mock.scope");
    
            Name name = new Name(mockConfig, mockNetbiosName);
    
            assertEquals("MOCKNAME", name.name);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/smb1/smb1/SmbSessionTest.java

            transport.server = serverData;
    
            smbtStatic = mockStatic(SmbTransport.class);
            smbtStatic.when(() -> SmbTransport.getSmbTransport(addr, 445, inet, 0, null)).thenReturn(transport);
            smbtStatic.when(() -> SmbTransport.getSmbTransport(addr, 445)).thenReturn(transport);
        }
    
        @AfterEach
        void tearDown() {
            if (smbtStatic != null) {
                smbtStatic.close();
            }
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  9. src/test/java/jcifs/netbios/NodeStatusRequestTest.java

        void setUp() {
            // Setup default mock behavior
            lenient().when(mockConfig.getNetbiosScope()).thenReturn("DEFAULT.SCOPE");
            lenient().when(mockConfig.getOemEncoding()).thenReturn("UTF-8");
    
            // Setup mock name
            lenient().when(mockName.writeWireFormat(any(byte[].class), anyInt())).thenReturn(34);
            mockName.hexCode = 0x20;
            mockName.name = "TEST";
            mockName.scope = "test.scope";
        }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 13.9K bytes
    - Viewed (0)
  10. src/test/java/jcifs/internal/smb1/trans/SmbComTransactionTest.java

            }
        }
    
        @BeforeEach
        void setUp() {
            MockitoAnnotations.openMocks(this);
            when(mockConfig.getTransactionBufferSize()).thenReturn(65535);
            when(mockConfig.getOemEncoding()).thenReturn("ASCII");
            transaction = new TestSmbComTransaction(mockConfig, SmbComTransaction.SMB_COM_TRANSACTION, SmbComTransaction.TRANS2_FIND_FIRST2);
        }
    
        @Test
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 10.7K bytes
    - Viewed (0)
Back to top