public void ConstructionTests() { var accessor = new JsonHamnetDbAccessor(TestConstants.HostsUrl, TestConstants.SubnetsUrl, TestConstants.SitesUrl, null); Assert.NotNull(accessor, "Constructed accessor is null"); Assert.AreEqual(TestConstants.HostsUrl, accessor.HostApiUrl); Assert.AreEqual(TestConstants.SubnetsUrl, accessor.SubnetsApiUrl); }
public void QuerySubnetsTest() { var accessor = new JsonHamnetDbAccessor(TestConstants.HostsUrl, TestConstants.SubnetsUrl, TestConstants.SitesUrl, null); Assert.NotNull(accessor, "The accessor returned by provider is null"); var subnets = accessor.QuerySubnets(); Assert.NotNull(subnets, "The subnets return data is null"); Assert.Greater(subnets.Count, 0, "No subnets returned at all"); }