コード例 #1
0
        public void GetAncestorsTestEmpty(string docId)
        {
            var dotnetCatalog = new TestDotNetCatalog();
            var catalog = new CloudApiCatalogLookup(dotnetCatalog);

            var results = catalog.GetAncestors(docId);

            Assert.Empty(results);
        }
コード例 #2
0
        public void GetAncestorsTest(string docId, string ancestors)
        {
            var dotnetCatalog = new TestDotNetCatalog();
            var catalog = new CloudApiCatalogLookup(dotnetCatalog);

            var expected = ancestors != null ? ancestors.Split(';') : null;

            int index = 0;

            foreach (var result in catalog.GetAncestors(docId))
            {
                Assert.Equal(expected[index], result);
                index++;
            }
        }