Пример #1
0
        public void FileIsCacheable()
        {
            const string cacheableFileName    = "/barney/CacheUnitTest.DXF_Tiles$/Z14/6420/2960.png";
            const string nonCacheableFileName = "/barney/dummy.png";

            Assert.True(TCCFile.FileCacheable(cacheableFileName), "File should be cacheable");
            Assert.False(TCCFile.FileCacheable(nonCacheableFileName), "File should not be cacheable");
        }
Пример #2
0
        public void CanExtractFileName()
        {
            const string baseFileName         = "/barney/CacheUnitTest.DXF";
            const string cacheableFileName    = baseFileName + "_Tiles$/Z14/6420/2960.png";
            const string nonCacheableFileName = "/barney/dummy.png";

            Assert.Equal(baseFileName, TCCFile.ExtractFileNameFromTileFullName(cacheableFileName));
            Assert.Throws <ArgumentException>(() => TCCFile.ExtractFileNameFromTileFullName(nonCacheableFileName));
        }