public void ParseTest(string addr, string host, int port) { BobNodeAddress parsed = BobNodeAddress.Parse(addr); Assert.Equal(host, parsed.Host); Assert.Equal(port, parsed.Port); }
public void ParseFormatExceptionTest(string addr) { Assert.False(BobNodeAddress.TryParse(addr, out BobNodeAddress _)); Assert.Throws <FormatException>(() => { BobNodeAddress.Parse(addr); }); }