Exemplo n.º 1
0
        public void FileHashWithValidFileReturnsHash()
        {
            IFileHashProvider hashProvider = new FileHashProvider();
            var contentHash = hashProvider.GetFileHash(@"..\..\..\Code Test\mew.jpg");

            Assert.IsNotNull(contentHash);
        }
 public CppProgramBuilder(CppToolChain cppToolChain, ProgramBuildDescription programBuildDescription, bool verbose, bool forceRebuild)
 {
     this._verbose                 = verbose;
     this._forceRebuild            = forceRebuild;
     this._programBuildDescription = programBuildDescription;
     this._cppToolChain            = cppToolChain;
     if (programBuildDescription.GlobalCacheDirectory == null)
     {
     }
     this._workingDirectory           = TempDir.Empty("workingdir_" + programBuildDescription.GetType().Name);
     this._globalObjectCacheDirectory = this._workingDirectory.EnsureDirectoryExists("globalcache");
     string[] fileExtensions = new string[] { ".h", ".inc" };
     this._headerHashProvider = new FileHashProvider(fileExtensions);
 }
Exemplo n.º 3
0
        public void FileHashWithInvalidPathReturnsError()
        {
            IFileHashProvider hashProvider = new FileHashProvider();

            hashProvider.GetFileHash("zzz");
        }
Exemplo n.º 4
0
        public void FileHashWithEmptyPathReturnsError()
        {
            IFileHashProvider hashProvider = new FileHashProvider();

            hashProvider.GetFileHash(string.Empty);
        }