Пример #1
0
        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);
        }
Пример #2
0
        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");
        }