public void Resolve() { using (var dot = new DotClient()) { var addresses = dot.ResolveAsync("github.com").Result.ToArray(); Assert.AreNotEqual(0, addresses.Length); addresses = dot.ResolveAsync("ipfs.io").Result.ToArray(); Assert.AreNotEqual(0, addresses.Length); } }
public async Task Reverse() { using (var dot = new DotClient()) { var name = await dot.ResolveAsync(IPAddress.Parse("1.1.1.1")); Assert.AreEqual("one.one.one.one", name); name = await dot.ResolveAsync(IPAddress.Parse("2606:4700:4700::1111")); Assert.AreEqual("one.one.one.one", name); } }
public async Task Resolve_Reverse() { using (var dot = new DotClient()) { var github = "github.com"; var addresses = await dot.ResolveAsync(github); foreach (var address in addresses) { var name = await dot.ResolveAsync(address); StringAssert.EndsWith(name.ToString(), ".com"); } } }
public void Resolve_Unknown() { using (var dot = new DotClient()) { ExceptionAssert.Throws <IOException>(() => { var _ = dot.ResolveAsync("emanon.noname").Result; }); } }