public void returns_temp_filenames_detectable_by_getalltempfiles_method()
        {
            var strategy = new VersionedPatternFileNamingStrategy(PathName, "chunk-");
            Assert.AreEqual(0, strategy.GetAllTempFiles().Length);

            var tmp1 = strategy.GetTempFilename();
            var tmp2 = strategy.GetTempFilename();
            File.Create(tmp1).Close();
            File.Create(tmp2).Close();
            var tmp = new[] { tmp1, tmp2 };
            Array.Sort(tmp);

            var tempFiles = strategy.GetAllTempFiles();
            Array.Sort(tempFiles);
            Assert.AreEqual(2, tempFiles.Length);
            Assert.AreEqual(tmp[0], tempFiles[0]);
            Assert.AreEqual(tmp[1], tempFiles[1]);
        }
        public void returns_all_temp_files_in_directory()
        {
            File.Create(GetFilePathFor("bla")).Close();
            File.Create(GetFilePathFor("bla.tmp")).Close();
            File.Create(GetFilePathFor("bla.temp")).Close();

            File.Create(GetFilePathFor("chunk-000005.000007.tmp")).Close();

            File.Create(GetFilePathFor("foo.tmp")).Close();

            var strategy = new VersionedPatternFileNamingStrategy(PathName, "chunk-");
            var tempFiles = strategy.GetAllTempFiles();

            Assert.AreEqual(3, tempFiles.Length);
            Assert.AreEqual(GetFilePathFor("bla.tmp"), tempFiles[0]);
            Assert.AreEqual(GetFilePathFor("chunk-000005.000007.tmp"), tempFiles[1]);
            Assert.AreEqual(GetFilePathFor("foo.tmp"), tempFiles[2]);
        }