public void MemoryFileSystem_DeleteAgo()
        {
            //arrange
            var rootFolderPath = "A:\\TestFolder\\Test";
            var content        = "This is test string";

            using (var fileSystem = CreateTestMemoryFile(rootFolderPath, content))
            {
                var adapter = new FileAdapter(fileSystem);

                //act
                adapter.DeleteAgo(rootFolderPath, 2);

                //assert
                var directoryContent = fileSystem.Browse(rootFolderPath);
                Assert.AreEqual(true, directoryContent.Any() == false);
            }
        }
        public void FileSystem_DeleteAgo()
        {
            //arrange
            var executingAssembly = Assembly.GetExecutingAssembly();
            var rootFolderPath    = Path.GetDirectoryName(executingAssembly.Location);
            var targetFolderName  = "TestFolder";
            var content           = "This is test string";

            using (var fileSystem = CreateTestFile(rootFolderPath, targetFolderName, content))
            {
                var adapter = new FileAdapter(fileSystem);

                //act
                adapter.DeleteAgo(targetFolderName, 2);

                //assert
                var directoryContent = fileSystem.Browse("targetFolder");
                Assert.AreEqual(true, directoryContent.Any() == false);

                //restore
                fileSystem.Delete(targetFolderName, true);
            }
        }