コード例 #1
0
        public void WhenTheReadObservableBytesMethodIsCalledWithTheFilename()
        {
            var filePath = _scenario.Get <string>("filePath");
            var stream   = ReactiveFileUtils.ReadObservableBytes(filePath);

            _scenario.Set <IList <byte> >(stream.ToList().Wait());
        }
コード例 #2
0
        public void WhenTheReadObservableByteBufferMethodIsCalledWithTheFilenameAndBufferSize()
        {
            var filePath   = _scenario.Get <string>("filePath");
            var bufferSize = _scenario.Get <int>("bufferSize");
            var stream     = ReactiveFileUtils.ReadObservableByteBuffer(filePath, bufferSize);
            IList <IList <byte> > lists = stream.ToList().Wait();

            _scenario.Set <byte[][]>(lists.ToJagged(), "result");
        }
コード例 #3
0
 public void WhenTheReadObservableStringsMethodIsCalledWithTheFilename()
 {
     try
     {
         var filePath = _scenario.Get <string>("filePath");
         var stream   = ReactiveFileUtils.ReadObservableStrings(filePath);
         _scenario.Set <IList <string> >(stream.ToList().Wait());
     }
     catch (Exception ex)
     {
         _scenario.Set(ex);
     }
 }