コード例 #1
0
ファイル: HostnamePortTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void testIPv6LocalhostWithSchemeAndPort()
        internal virtual void TestIPv6LocalhostWithSchemeAndPort()
        {
            HostnamePort hostnamePort = new HostnamePort("foo://[::1]:6362");

            assertThat(hostnamePort.GetHost(null), equalTo("[::1]"));
            assertThat(hostnamePort.Port, equalTo(6362));
            assertThat(hostnamePort.Ports, equalTo(new int[] { 6362, 6362 }));
        }
コード例 #2
0
ファイル: HostnamePortTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void testIPv6Localhost()
        internal virtual void TestIPv6Localhost()
        {
            HostnamePort hostnamePort = new HostnamePort("[::1]");

            assertThat(hostnamePort.GetHost(null), equalTo("[::1]"));
            assertThat(hostnamePort.Port, equalTo(0));
            assertThat(hostnamePort.Ports, equalTo(new int[] { 0, 0 }));
        }
コード例 #3
0
ファイル: HostnamePortTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void testIPv6Address()
        internal virtual void TestIPv6Address()
        {
            HostnamePort hostnamePort = new HostnamePort("[2001:cdba:0:0:0:0:3257:9652]");

            assertThat(hostnamePort.GetHost(null), equalTo("[2001:cdba:0:0:0:0:3257:9652]"));
            assertThat(hostnamePort.Port, equalTo(0));
            assertThat(hostnamePort.Ports, equalTo(new int[] { 0, 0 }));
        }
コード例 #4
0
ファイル: HostnamePortTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void testIPv6AddressWithSchemeAndPort()
        internal virtual void TestIPv6AddressWithSchemeAndPort()
        {
            HostnamePort hostnamePort = new HostnamePort("foo://[ff02::1:1]:9191");

            assertThat(hostnamePort.GetHost(null), equalTo("[ff02::1:1]"));
            assertThat(hostnamePort.Port, equalTo(9191));
            assertThat(hostnamePort.Ports, equalTo(new int[] { 9191, 9191 }));
        }
コード例 #5
0
ファイル: HostnamePortTest.cs プロジェクト: Neo4Net/Neo4Net
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Test void testDefaultHost()
        internal virtual void TestDefaultHost()
        {
            HostnamePort hostnamePort = new HostnamePort(":1234");

            assertThat(hostnamePort.GetHost("1.2.3.4"), equalTo("1.2.3.4"));
        }