public void CacheMappingMatrix() { var fromElementSet = CreateElementSet("4 Points"); var toElementSet = CreateElementSet("2 Points"); ElementMapper.SupportsCaching = true; var elementMapper = new ElementMapper(); var methodDescriptions = elementMapper.GetAvailableMethods(fromElementSet.ElementType, toElementSet.ElementType); ElementMapper.CacheFileDirectory = @".\"; var cacheFilePath = ElementMapper.GetCacheFilePath(methodDescriptions[0].ToString(), fromElementSet, toElementSet); if (File.Exists(cacheFilePath)) { File.Delete(cacheFilePath); } elementMapper.Initialise(methodDescriptions[0].ToString(), fromElementSet, toElementSet); Assert.IsTrue(File.Exists(cacheFilePath)); // initialize (uses cache file) var elementMapper2 = new ElementMapper(); elementMapper2.Initialise(methodDescriptions[0].ToString(), fromElementSet, toElementSet); }