public GetFileFromDfsRequestObserverTests()
        {
            _hashProvider        = new HashProvider(HashingAlgorithm.GetAlgorithmMetadata("blake2b-256"));
            _fileTransferFactory = Substitute.For <IUploadFileTransferFactory>();
            _dfs = Substitute.For <IDfs>();
            var peerSettings = PeerIdHelper.GetPeerId("test").ToSubstitutedPeerSettings();

            _observer = new GetFileFromDfsRequestObserver(_dfs, _hashProvider, peerSettings, _fileTransferFactory,
                                                          Substitute.For <ILogger>());
        }
示例#2
0
        public void Init()
        {
            _hashProvider        = new HashProvider(HashingAlgorithm.GetAlgorithmMetadata("keccak-256"));
            _fileTransferFactory = Substitute.For <IUploadFileTransferFactory>();
            _dfsService          = Substitute.For <IDfsService>();
            var peerSettings = PeerIdHelper.GetPeerId("test").ToSubstitutedPeerSettings();

            _observer = new GetFileFromDfsRequestObserver(_dfsService, peerSettings, _fileTransferFactory,
                                                          Substitute.For <ILogger>());
        }