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); }
public void FileHashWithInvalidPathReturnsError() { IFileHashProvider hashProvider = new FileHashProvider(); hashProvider.GetFileHash("zzz"); }
public void FileHashWithEmptyPathReturnsError() { IFileHashProvider hashProvider = new FileHashProvider(); hashProvider.GetFileHash(string.Empty); }