public void CanRenameJsonFile() { string oldfilePath = @"d:\output\pickledFeatures.json"; string newFilePath = @"d:\output\pickledFeatures.js"; MockFileSystem.AddFile(oldfilePath, "test data"); var jsonTweaker = new JsonTweaker(MockFileSystem); jsonTweaker.RenameFileTo(oldfilePath, newFilePath); Assert.IsTrue(MockFileSystem.File.Exists(newFilePath)); Assert.IsFalse(MockFileSystem.File.Exists(oldfilePath)); }
public void CanRenameJsonFile() { string oldfilePath = @"d:\output\pickledFeatures.json"; string newFilePath = @"d:\output\pickledFeatures.js"; FileSystem.AddFile(oldfilePath, "test data"); var jsonTweaker = new JsonTweaker(FileSystem); jsonTweaker.RenameFileTo(oldfilePath, newFilePath); var doesNewPathExist = FileSystem.File.Exists(newFilePath); Check.That(doesNewPathExist).IsTrue(); var doesOldPathExist = FileSystem.File.Exists(oldfilePath); Check.That(doesOldPathExist).IsFalse(); }