Пример #1
0
        public void TestGetChecksumOk()
        {
            //SETUP
            var mvc5ImagePath = Path.Combine(TestFileHelpers.GetSolutionDirectory(),
                                             "WebApplication.Mvc5\\images\\annoyed-cat.jpg");
            var fileSize = File.ReadAllBytes(mvc5ImagePath).Length;

            //ATTEMPT
            using (new TimerToConsole($"GetChecksumBasedOnFileContent - file size {fileSize:#,###} bytes"))
            {
                var output = BowerBundlerHelper.GetChecksumBasedOnFileContent(mvc5ImagePath);
            }

            //VERIFY
        }
Пример #2
0
        public static Func <string, string> GetChecksumFromRelPath(string testSubDirToUse = null)
        {
            var lookupFunc = GetActualFilePathFromVirtualPath(testSubDirToUse);

            return(s => BowerBundlerHelper.GetChecksumBasedOnFileContent(lookupFunc(s)));
        }