Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 13 for getNameType (0.05 sec)

  1. src/test/java/jcifs/NetbiosNameTest.java

        @Test
        @DisplayName("Should handle getNameType() method")
        void testGetNameType() {
            // Given
            int testType = 0x20; // Server service
            when(mockNetbiosName.getNameType()).thenReturn(testType);
    
            // When
            int nameType = mockNetbiosName.getNameType();
    
            // Then
            assertEquals(testType, nameType);
            verify(mockNetbiosName).getNameType();
        }
    
        @ParameterizedTest
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 8K bytes
    - Viewed (0)
  2. src/test/java/jcifs/netbios/SessionRequestPacketTest.java

        void testConstructorWithNetbiosNames() {
            when(mockCalledName.getName()).thenReturn("SERVER");
            when(mockCalledName.getNameType()).thenReturn(0x20);
            when(mockCalledName.getScope()).thenReturn(null);
    
            when(mockCallingName.getName()).thenReturn("CLIENT");
            when(mockCallingName.getNameType()).thenReturn(0x00);
            when(mockCallingName.getScope()).thenReturn(null);
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 11.5K bytes
    - Viewed (0)
  3. src/main/java/jcifs/netbios/NbtAddress.java

                NetbiosAddress[] addrs;
    
                try {
                    addrs = tc.getNameServiceClient().getNodeStatus(this);
                    if (this.getNameType() == 0x1D) {
                        for (final NetbiosAddress addr : addrs) {
                            if (addr.getNameType() == 0x20) {
                                return addr.getHostName();
                            }
                        }
                        return null;
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  4. src/main/java/jcifs/NetbiosName.java

         *
         * @return the scope id
         */
        String getScope();
    
        /**
         * Returns the NetBIOS name type.
         *
         * @return the name type
         */
        int getNameType();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 1.2K bytes
    - Viewed (0)
  5. src/test/java/jcifs/smb/SmbResourceLocatorImplTest.java

            Address addr = mock(Address.class);
            NetbiosAddress nb = mock(NetbiosAddress.class);
            when(addr.unwrap(NetbiosAddress.class)).thenReturn(nb);
            when(nb.getNameType()).thenReturn(0x1d); // workgroup code
            // getFirstAddress branch: host given and path non-root -> possibleNTDomain=false
            when(nsc.getAllByName(eq("server"), eq(false))).thenReturn(new Address[] { addr });
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 17.6K bytes
    - Viewed (0)
  6. src/main/java/jcifs/netbios/Name.java

         * @return scope id
         */
        @Override
        public String getScope() {
            return this.scope;
        }
    
        /**
         *
         * @return the name type
         */
        @Override
        public int getNameType() {
            return this.hexCode;
        }
    
        /**
         * Constructs a NetBIOS name with the specified parameters.
         *
         * @param cfg the configuration to use
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 8K bytes
    - Viewed (0)
  7. src/test/java/jcifs/netbios/NbtAddressTest.java

        }
    
        @Test
        void testGetNameType() {
            // Test getNameType
            mockName = new Name(mockConfig, "TEST", 0x20, null);
            NbtAddress nbtAddress = new NbtAddress(mockName, testAddressInt, false, NbtAddress.H_NODE);
            assertEquals(0x20, nbtAddress.getNameType());
        }
    
        @Test
        void testHashCode() {
            // Test hashCode consistency
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 20.4K bytes
    - Viewed (0)
  8. src/main/java/jcifs/NetbiosAddress.java

        /**
         * Returned the hex code associated with this name(e.g. 0x20 is for the file service)
         *
         * @return the name type
         */
        int getNameType();
    
        /**
         * Gets the NetBIOS name associated with this address.
         *
         * @return the name for this address
         */
        NetbiosName getName();
    
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Sat Aug 16 01:32:48 UTC 2025
    - 6.1K bytes
    - Viewed (0)
  9. src/test/java/jcifs/netbios/NameTest.java

            assertEquals("test.scope", name.getScope());
        }
    
        @Test
        void getNameType_shouldReturnHexCode() {
            Name name = new Name(mockConfig, "TestName", 0x1C, null);
            assertEquals(0x1C, name.getNameType());
        }
    
        @Test
        void isUnknown_withUnknownAddress_shouldReturnTrue() {
            Name name = new Name(mockConfig, "0.0.0.0", 0, null);
            name.scope = null;
            assertTrue(name.isUnknown());
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 05:31:44 UTC 2025
    - 19.4K bytes
    - Viewed (0)
  10. src/main/java/jcifs/smb/SmbResourceLocatorImpl.java

                    try {
                        final NetbiosAddress nbaddr = getAddress().unwrap(NetbiosAddress.class);
                        if (nbaddr != null) {
                            final int code = nbaddr.getNameType();
                            if (code == 0x1d || code == 0x1b) {
                                this.type = SmbConstants.TYPE_WORKGROUP;
                                return this.type;
                            }
    Registered: Sun Sep 07 00:10:21 UTC 2025
    - Last Modified: Thu Aug 14 07:14:38 UTC 2025
    - 23.6K bytes
    - Viewed (0)
Back to top