Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 37 for simulate (0.1 sec)

  1. src/test/java/jcifs/dcerpc/msrpc/SamrDomainHandleTest.java

            // Arrange
            int access = 0x01;
            int errorCode = 0xC0000022; // Example error code (STATUS_ACCESS_DENIED)
            // Simulate RPC error
            doAnswer(invocation -> {
                MsrpcSamrOpenDomain rpc = invocation.getArgument(0);
                rpc.retval = errorCode; // Simulate error
                return null;
            }).when(mockDcerpcHandle).sendrecv(any(MsrpcSamrOpenDomain.class));
    
            // Act & Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  2. src/test/java/jcifs/dcerpc/msrpc/LsaPolicyHandleTest.java

            int access = 123;
    
            // Mock the behavior of sendrecv for MsrpcLsarOpenPolicy2
            doAnswer(invocation -> {
                MsrpcLsarOpenPolicy2 rpc = invocation.getArgument(0);
                rpc.retval = 0; // Simulate success
                return null;
            }).when(mockDcerpcHandle).sendrecv(any(MsrpcLsarOpenPolicy2.class));
    
            // Act
            LsaPolicyHandle handle = new LsaPolicyHandle(mockDcerpcHandle, server, access);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/witness/MockWitnessService.java

            if (serverSocket == null) {
                throw new IOException("Service not started");
            }
            return serverSocket.getLocalPort();
        }
    
        /**
         * Simulate a witness registration
         *
         * @param shareName the share name
         * @param serverAddress the server address
         * @param flags the registration flags
         * @return the registration ID
         */
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 09:06:40 UTC 2025
    - 8.2K bytes
    - Viewed (0)
  4. src/test/java/jcifs/util/transport/ResponseTest.java

        @Test
        void testGetGrantedCredits() {
            // Simulate granted credits
            when(mockResponse.getGrantedCredits()).thenReturn(100);
            assertEquals(100, mockResponse.getGrantedCredits());
    
            // Verify the method was called
            verify(mockResponse, times(1)).getGrantedCredits();
        }
    
        @Test
        void testGetErrorCode() {
            // Simulate error code
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.5K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb1/dcerpc/msrpc/LsaPolicyHandleTest.java

            int access = 123;
    
            // Mock the behavior of sendrecv for MsrpcLsarOpenPolicy2
            doAnswer(invocation -> {
                MsrpcLsarOpenPolicy2 rpc = invocation.getArgument(0);
                rpc.retval = 0; // Simulate success
                return null;
            }).when(mockDcerpcHandle).sendrecv(any(MsrpcLsarOpenPolicy2.class));
    
            // Act
            LsaPolicyHandle handle = new LsaPolicyHandle(mockDcerpcHandle, server, access);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7.2K bytes
    - Viewed (0)
  6. src/test/java/jcifs/context/AbstractCIFSContextTest.java

            assertFalse(result); // AbstractCIFSContext always returns false for close()
            assertTrue(context.isCloseCalled());
        }
    
        @Test
        void testRun_successfulClose() throws CIFSException {
            // Simulate the shutdown hook being run
            context.run();
    
            assertTrue(context.isCloseCalled()); // Verify close() was called
        }
    
        @Test
        void testRun_closeThrowsException() throws CIFSException {
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  7. src/test/java/jcifs/dcerpc/ndr/NdrObjectTest.java

                }
                // Simulate some encoding activity on the buffer
                dst.enc_ndr_long(123);
            }
    
            @Override
            public void decode(NdrBuffer src) throws NdrException {
                if (throwOnDecode) {
                    throw new NdrException("Failed to decode");
                }
                // Simulate some decoding activity on the buffer
                src.dec_ndr_long();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3.4K bytes
    - Viewed (0)
  8. src/test/java/jcifs/dcerpc/msrpc/SamrAliasHandleTest.java

            int rid = 100;
            int errorCode = 0xC0000022; // Example error code
    
            // Mock the behavior of sendrecv for MsrpcSamrOpenAlias to simulate failure
            doAnswer(invocation -> {
                MsrpcSamrOpenAlias rpc = invocation.getArgument(0);
                rpc.retval = errorCode; // Simulate failure
                return null;
            }).when(mockDcerpcHandle).sendrecv(any(MsrpcSamrOpenAlias.class));
    
            // Act & Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.2K bytes
    - Viewed (0)
  9. src/test/java/org/codelibs/fess/mylasta/direction/sponsor/FessCurtainFinallyHookTest.java

            // Create a hook that simulates an exception scenario
            AtomicBoolean exceptionHandled = new AtomicBoolean(false);
    
            FessCurtainFinallyHook customHook = new FessCurtainFinallyHook() {
                @Override
                public void hook(final FwAssistantDirector assistantDirector) {
                    try {
                        // Simulate a scenario where the method exists but invocation fails
    Registered: Thu Sep 04 12:52:25 UTC 2025
    - Last Modified: Tue Aug 19 14:09:36 UTC 2025
    - 8.7K bytes
    - Viewed (0)
  10. src/main/java/jcifs/internal/smb2/rdma/tcp/TcpRdmaConnection.java

    import jcifs.internal.smb2.rdma.RdmaNegotiateRequest;
    import jcifs.internal.smb2.rdma.RdmaNegotiateResponse;
    
    /**
     * TCP-based RDMA connection implementation.
     *
     * Uses regular TCP sockets to simulate RDMA operations.
     * This provides a fallback when real RDMA hardware is not available.
     */
    public class TcpRdmaConnection extends RdmaConnection {
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 23 05:11:12 UTC 2025
    - 8.8K bytes
    - Viewed (0)
Back to top