示例#1
0
        public void GetGroupLayers_FromDocument_Test(string subDirectory, string mapDocumentFilename, string dataframeName, int expectedLayerCount)
        {
            string temp   = System.IO.Path.Combine(_dataDirectory, subDirectory);
            string mapDoc = System.IO.Path.Combine(temp, mapDocumentFilename);

            IMapDocument mapDocument = new MapDocumentClass();

            mapDocument.Open(mapDoc, null);

            List <IGroupLayer> layers = GeodatabaseUtil.GetGroupLayers(mapDocument, dataframeName);

            Assert.IsNotNull(layers, "Unable to obtain layers from map");
            Assert.AreEqual(expectedLayerCount, layers.Count, "Number of layers from map do not match expected value.");
        }