示例#1
0
            public override void Context()
            {
                base.Context();
                Provider = new CrytpoHashProvider(FileSystem.Object, _hashAlgorithm.Object);

                FileSystem.Setup(x => x.file_exists(It.IsAny <string>())).Returns(true);
                FileSystem.Setup(x => x.read_file_bytes(filePath)).Returns(byteArray);
                _hashAlgorithm.Setup(x => x.ComputeHash(byteArray)).Throws <IOException>(); //IO.IO_FileTooLong2GB (over Int32.MaxValue)
            }
 public override void Context()
 {
     FileSystem       = new DotNetFileSystem();
     Provider         = new CrytpoHashProvider(FileSystem, CryptoHashProviderType.Md5);
     ContextDirectory = FileSystem.combine_paths(FileSystem.get_directory_name(Assembly.GetExecutingAssembly().CodeBase.Replace("file:///", string.Empty)), "context");
 }
示例#3
0
 public override void Context()
 {
     Provider = new CrytpoHashProvider(FileSystem.Object, CryptoHashProviderType.Md5);
 }
示例#4
0
 public override void Context()
 {
     FileSystem       = new DotNetFileSystem();
     Provider         = new CrytpoHashProvider(FileSystem, CryptoHashProviderType.Md5);
     ContextDirectory = FileSystem.combine_paths(FileSystem.get_directory_name(FileSystem.get_current_assembly_path()), "context");
 }