/// <exception cref="System.Exception"/> public virtual void TestDeprecatedFunctions() { DistributedCache.AddLocalArchives(conf, "Test Local Archives 1"); NUnit.Framework.Assert.AreEqual("Test Local Archives 1", conf.Get(DistributedCache .CacheLocalarchives)); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetLocalCacheArchives(conf).Length ); NUnit.Framework.Assert.AreEqual("Test Local Archives 1", DistributedCache.GetLocalCacheArchives (conf)[0].GetName()); DistributedCache.AddLocalArchives(conf, "Test Local Archives 2"); NUnit.Framework.Assert.AreEqual("Test Local Archives 1,Test Local Archives 2", conf .Get(DistributedCache.CacheLocalarchives)); NUnit.Framework.Assert.AreEqual(2, DistributedCache.GetLocalCacheArchives(conf).Length ); NUnit.Framework.Assert.AreEqual("Test Local Archives 2", DistributedCache.GetLocalCacheArchives (conf)[1].GetName()); DistributedCache.SetLocalArchives(conf, "Test Local Archives 3"); NUnit.Framework.Assert.AreEqual("Test Local Archives 3", conf.Get(DistributedCache .CacheLocalarchives)); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetLocalCacheArchives(conf).Length ); NUnit.Framework.Assert.AreEqual("Test Local Archives 3", DistributedCache.GetLocalCacheArchives (conf)[0].GetName()); DistributedCache.AddLocalFiles(conf, "Test Local Files 1"); NUnit.Framework.Assert.AreEqual("Test Local Files 1", conf.Get(DistributedCache.CacheLocalfiles )); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetLocalCacheFiles(conf).Length ); NUnit.Framework.Assert.AreEqual("Test Local Files 1", DistributedCache.GetLocalCacheFiles (conf)[0].GetName()); DistributedCache.AddLocalFiles(conf, "Test Local Files 2"); NUnit.Framework.Assert.AreEqual("Test Local Files 1,Test Local Files 2", conf.Get (DistributedCache.CacheLocalfiles)); NUnit.Framework.Assert.AreEqual(2, DistributedCache.GetLocalCacheFiles(conf).Length ); NUnit.Framework.Assert.AreEqual("Test Local Files 2", DistributedCache.GetLocalCacheFiles (conf)[1].GetName()); DistributedCache.SetLocalFiles(conf, "Test Local Files 3"); NUnit.Framework.Assert.AreEqual("Test Local Files 3", conf.Get(DistributedCache.CacheLocalfiles )); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetLocalCacheFiles(conf).Length ); NUnit.Framework.Assert.AreEqual("Test Local Files 3", DistributedCache.GetLocalCacheFiles (conf)[0].GetName()); DistributedCache.SetArchiveTimestamps(conf, "1234567890"); NUnit.Framework.Assert.AreEqual(1234567890, conf.GetLong(DistributedCache.CacheArchivesTimestamps , 0)); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetArchiveTimestamps(conf).Length ); NUnit.Framework.Assert.AreEqual(1234567890, DistributedCache.GetArchiveTimestamps (conf)[0]); DistributedCache.SetFileTimestamps(conf, "1234567890"); NUnit.Framework.Assert.AreEqual(1234567890, conf.GetLong(DistributedCache.CacheFilesTimestamps , 0)); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetFileTimestamps(conf).Length ); NUnit.Framework.Assert.AreEqual(1234567890, DistributedCache.GetFileTimestamps(conf )[0]); DistributedCache.CreateAllSymlink(conf, new FilePath("Test Job Cache Dir"), new FilePath ("Test Work Dir")); NUnit.Framework.Assert.IsNull(conf.Get(DistributedCache.CacheSymlink)); NUnit.Framework.Assert.IsTrue(DistributedCache.GetSymlink(conf)); NUnit.Framework.Assert.IsTrue(symlinkFile.CreateNewFile()); FileStatus fileStatus = DistributedCache.GetFileStatus(conf, symlinkFile.ToURI()); NUnit.Framework.Assert.IsNotNull(fileStatus); NUnit.Framework.Assert.AreEqual(fileStatus.GetModificationTime(), DistributedCache .GetTimestamp(conf, symlinkFile.ToURI())); NUnit.Framework.Assert.IsTrue(symlinkFile.Delete()); DistributedCache.AddCacheArchive(symlinkFile.ToURI(), conf); NUnit.Framework.Assert.AreEqual(symlinkFile.ToURI().ToString(), conf.Get(DistributedCache .CacheArchives)); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetCacheArchives(conf).Length ); NUnit.Framework.Assert.AreEqual(symlinkFile.ToURI(), DistributedCache.GetCacheArchives (conf)[0]); DistributedCache.AddCacheFile(symlinkFile.ToURI(), conf); NUnit.Framework.Assert.AreEqual(symlinkFile.ToURI().ToString(), conf.Get(DistributedCache .CacheFiles)); NUnit.Framework.Assert.AreEqual(1, DistributedCache.GetCacheFiles(conf).Length); NUnit.Framework.Assert.AreEqual(symlinkFile.ToURI(), DistributedCache.GetCacheFiles (conf)[0]); }