public void WhenTheReadObservableBytesMethodIsCalledWithTheFilename() { var filePath = _scenario.Get <string>("filePath"); var stream = ReactiveFileUtils.ReadObservableBytes(filePath); _scenario.Set <IList <byte> >(stream.ToList().Wait()); }
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"); }
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); } }