Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 398 for Arrange (0.04 sec)

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

        void constructor_shouldSetHandleCorrectly() {
            // Arrange
            short level = 1;
    
            // Act
            queryPolicy = new MsrpcQueryInformationPolicy(mockPolicyHandle, level, mockNdrObject);
    
            // Assert
            assertSame(mockPolicyHandle, queryPolicy.handle);
        }
    
        @Test
        void constructor_shouldSetLevelCorrectly() {
            // Arrange
            short level = 7;
    
            // Act
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 6.6K bytes
    - Viewed (0)
  2. src/test/java/jcifs/internal/smb2/session/Smb2LogoffRequestTest.java

                // Arrange
                Smb2LogoffRequest req = newRequest();
    
                // Act/Assert
                assertThrows(NullPointerException.class, () -> req.createResponse(null, req));
            }
    
            @Test
            @DisplayName("createResponse tolerates null request parameter")
            void createResponse_nullRequest_ok() {
                // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  3. src/test/java/jcifs/internal/smb2/session/Smb2LogoffResponseTest.java

            return new Smb2LogoffResponse(cfg);
        }
    
        @Test
        @DisplayName("Constructor accepts a Configuration and creates instance")
        void constructor_happyPath() {
            // Arrange
            Configuration cfg = Mockito.mock(Configuration.class);
    
            // Act
            Smb2LogoffResponse resp = new Smb2LogoffResponse(cfg);
    
            // Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/smb1/trans/TransTransactNamedPipeTest.java

            assertEquals("\\PIPE\\", trans.name);
        }
    
        @Test
        @DisplayName("Test writeSetupWireFormat writes correct data")
        void testWriteSetupWireFormat() {
            // Arrange
            TransTransactNamedPipe trans = new TransTransactNamedPipe(mockConfig, TEST_FID, TEST_DATA, TEST_OFFSET, TEST_LENGTH);
            byte[] dst = new byte[10];
            int dstIndex = 0;
    
            // Act
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.7K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbPipeOutputStreamTest.java

        @Mock
        SmbTreeHandleImpl tree;
    
        @Mock
        SmbNamedPipe pipe;
    
        @Mock
        SmbFileHandleImpl fileHandle;
    
        private SmbPipeOutputStream newStream() throws CIFSException {
            // Arrange common constructor collaborators to avoid touching network/state
            when(handle.getPipe()).thenReturn(pipe);
            when(tree.isSMB2()).thenReturn(true);
            when(tree.getSendBufferSize()).thenReturn(4096);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SMBProtocolDowngradeExceptionTest.java

        }
    
        @Test
        @DisplayName("Default ctor: null message/cause; toString is class name; type hierarchy")
        void defaultConstructor_hasNullMessageAndCause_andTypeHierarchy() {
            // Arrange & Act
            SMBProtocolDowngradeException ex = new SMBProtocolDowngradeException();
    
            // Assert - message and cause are null
            assertNull(ex.getMessage(), "Default constructor should have null message");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbNamedPipeTest.java

            @DisplayName("Accepts IPC$ URLs (happy path)")
            @ValueSource(strings = { "smb://server/IPC$/foo", "smb://server/IPC$/PIPE/foo" })
            void constructsWithIpcShare(String url) throws Exception {
                // Arrange & Act
                SmbNamedPipe pipe = new SmbNamedPipe(url, SmbPipeResource.PIPE_TYPE_RDWR, ctx());
    
                // Assert: type is named pipe and pipe type preserved
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.2K bytes
    - Viewed (0)
  8. src/test/java/org/codelibs/curl/CurlTest.java

        public void test_GetFactoryMethod() {
            // ## Arrange ##
            final String url = "http://example.com";
    
            // ## Act ##
            final CurlRequest request = Curl.get(url);
    
            // ## Assert ##
            assertNotNull(request);
            assertEquals(Method.GET, request.method());
        }
    
        @Test
        public void test_PostFactoryMethod() {
            // ## Arrange ##
            final String url = "http://example.com";
    
    Registered: Thu Sep 04 15:34:10 UTC 2025
    - Last Modified: Thu Jul 31 01:01:12 UTC 2025
    - 8.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb1/dcerpc/msrpc/MsrpcSamrConnect2Test.java

                // Arrange
                SamrPolicyHandle ph = createMockPolicyHandle();
    
                // Act & Assert
                assertDoesNotThrow(() -> new MsrpcSamrConnect2(null, 0, ph));
            }
    
            @Test
            @DisplayName("should accept negative access mask values")
            void testNegativeAccessMaskAccepted() {
                // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.6K bytes
    - Viewed (0)
  10. src/test/java/jcifs/smb/SmbFileFilterTest.java

        }
    
        @Test
        @DisplayName("accept: returns true for directories; verifies isDirectory is invoked")
        void accept_returnsTrueForDirectory_andVerifiesInteraction() throws Exception {
            // Arrange: filter that accepts directories only
            SmbFileFilter filter = f -> f.isDirectory();
            when(smbFile.isDirectory()).thenReturn(true);
    
            // Act
            boolean result = filter.accept(smbFile);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.4K bytes
    - Viewed (0)
Back to top