public void GetLayers_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 <ILayer> layers = GeodatabaseUtil.GetLayers(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."); }