public void AutoMapWithExistingMapTest() { var config = new CsvConfiguration(); var existingMap = new SimpleMap(); existingMap.CreateMap(); config.Maps.Add(existingMap); var data = new { Simple = new Simple { Id = 1, Name = "one" } }; var map = config.AutoMap(data.GetType()); Assert.IsNotNull(map); Assert.AreEqual(0, map.PropertyMaps.Count); Assert.AreEqual(1, map.ReferenceMaps.Count); Assert.IsInstanceOfType(map.ReferenceMaps[0].Mapping, typeof(SimpleMap)); }