예제 #1
0
            public override void Context()
            {
                base.Context();
                Provider = new CryptoHashProvider(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)
            }
예제 #2
0
 public override void Context()
 {
     FileSystem = new DotNetFileSystem();
     Provider = new CryptoHashProvider(FileSystem);
     ContextDirectory = FileSystem.combine_paths(FileSystem.get_directory_name(FileSystem.get_current_assembly_path()), "context");
 }
예제 #3
0
 public override void Context()
 {
     Provider = Provider = new CryptoHashProvider(FileSystem.Object);
 }