Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 885 for Arrange (0.09 sec)

  1. src/test/java/jcifs/SmbTransportTest.java

        @Mock
        private Address remoteAddress;
    
        @BeforeEach
        void setUp() {
            // Common setup for mocks if needed
        }
    
        @Test
        void testGetContext() {
            // Arrange
            when(smbTransport.getContext()).thenReturn(cifsContext);
    
            // Act
            CIFSContext result = smbTransport.getContext();
    
            // Assert
            assertNotNull(result, "Context should not be null");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 3K bytes
    - Viewed (0)
  2. src/test/java/jcifs/smb/SmbAuthExceptionTest.java

        @ParameterizedTest
        @MethodSource("intErrorCodes")
        @DisplayName("int ctor: sets message and NT status as expected")
        void intConstructor_populatesMessageAndStatus(int errCode, int expectedStatus) {
            // Arrange & Act: create exception with error code
            SmbAuthException ex = new SmbAuthException(errCode);
    
            // Assert: type, message derived from code, status mapping, and no cause
            assertNotNull(ex);
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 4.3K bytes
    - Viewed (0)
  3. src/test/java/jcifs/smb/SmbRenewableCredentialsTest.java

        @DisplayName("renew() behaviors across implementations")
        void renewBehaviorsAcrossImplementations(String label, Supplier<SmbRenewableCredentials> supplier, boolean expectSame,
                boolean expectNew) {
            // Arrange: create an implementation instance
            SmbRenewableCredentials impl = supplier.get();
    
            // Act: call renew
            CredentialsInternal renewed = impl.renew();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 7K bytes
    - Viewed (0)
  4. src/test/java/jcifs/internal/SmbNegotiationResponseTest.java

            // Arrange
            when(negotiationResponse.isDFSSupported()).thenReturn(false);
    
            // Act
            boolean result = negotiationResponse.isDFSSupported();
    
            // Assert
            assertFalse(result);
            verify(negotiationResponse).isDFSSupported();
        }
    
        @Test
        @DisplayName("Test setupRequest method")
        void testSetupRequest() {
            // Arrange
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.6K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/CredentialsInternalTest.java

        @DisplayName("unwrap, domain, anonymous/guest flags happy paths")
        void unwrap_and_flags_happy(boolean[] flags) {
            boolean anonymous = flags[0];
            boolean guest = flags[1];
    
            // Arrange
            Subject subject = new Subject();
            TestCredentials creds = new TestCredentials("DOMAIN", anonymous, guest, subject, false);
    
            // Act & Assert
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.9K bytes
    - Viewed (0)
  6. src/test/java/jcifs/smb/SmbFileTest.java

                // Arrange & Act
                SmbFile file = new SmbFile(url, mockCifsContext);
    
                // Assert
                assertNotNull(file);
                assertEquals(mockCifsContext, file.getContext());
            }
    
            @Test
            void testConstructorWithStringURL() throws MalformedURLException {
                // Arrange & Act
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/smb/SmbTreeHandleInternalTest.java

        @Mock
        private SmbTreeHandleInternal handle;
    
        @Test
        @DisplayName("release(): verifies it is invoked exactly once")
        void release_invokedOnce() throws Exception {
            // Arrange: no setup needed; we verify interaction only
    
            // Act: call release
            handle.release();
    
            // Assert: verify one invocation and no more
            verify(handle, times(1)).release();
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 9.3K bytes
    - Viewed (0)
  8. src/test/java/jcifs/internal/smb1/trans/TransWaitNamedPipeTest.java

            assertEquals("", transWaitNamedPipe.name);
        }
    
        @Test
        @DisplayName("writeSetupWireFormat should write correct bytes")
        void testWriteSetupWireFormat() {
            // Arrange
            transWaitNamedPipe = new TransWaitNamedPipe(mockConfig, testPipeName);
            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
    - 8.8K bytes
    - Viewed (0)
  9. src/test/java/jcifs/smb/DosErrorTest.java

            // Assert
            assertEquals(-1, actual);
        }
    
        @Test
        @DisplayName("Structure: DOS_ERROR_CODES is non-null with [code,status] pairs")
        void dosErrorCodesStructureIsValid() {
            // Arrange & Act
            int[][] table = DosError.DOS_ERROR_CODES;
    
            // Assert
            assertNotNull(table, "DOS_ERROR_CODES must not be null");
            assertTrue(table.length > 0, "DOS_ERROR_CODES must not be empty");
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 5.9K bytes
    - Viewed (0)
  10. src/test/java/org/codelibs/core/exception/NullArgumentExceptionTest.java

            LocaleUtil.setDefault(null);
        }
    
        /**
         * @throws Exception
         */
        @Test
        public void testErrorMessage_ja() throws Exception {
            // ## Arrange ##
            Locale.setDefault(Locale.JAPANESE);
            final NullArgumentException nullArgumentException = new NullArgumentException("hoge");
            assertThat(nullArgumentException.getArgName(), is("hoge"));
    Registered: Fri Sep 05 20:58:11 UTC 2025
    - Last Modified: Sat May 10 01:32:17 UTC 2025
    - 2K bytes
    - Viewed (0)
Back to top