예제 #1
0
        public void ParseTest(string addr, string host, int port)
        {
            BobNodeAddress parsed = BobNodeAddress.Parse(addr);

            Assert.Equal(host, parsed.Host);
            Assert.Equal(port, parsed.Port);
        }
예제 #2
0
        public void ParseFormatExceptionTest(string addr)
        {
            Assert.False(BobNodeAddress.TryParse(addr, out BobNodeAddress _));

            Assert.Throws <FormatException>(() =>
            {
                BobNodeAddress.Parse(addr);
            });
        }