ParseOutput() public method

public ParseOutput ( Process sender, string data, ITransferProgress progress ) : void
sender System.Diagnostics.Process
data string
progress ITransferProgress
return void
        public void ParseOutput() {
            var parser = new ZsyncOutputParser();
            var progress = A.Fake<ITransferProgress>();
            var process = new Process();

            parser.ParseOutput(process, "###################- 97.3% 141.5 kBps 0:00:01 ETA", progress);

            progress.Progress.Should().Be(97.3);
            progress.Speed.Should().Be((long) (141.5*1024));
            progress.Eta.Should().Be(TimeSpan.FromSeconds(1));
        }
Esempio n. 2
0
 void ParseOutput(Process sender, string data, ITransferProgress progress)
 {
     _parser.ParseOutput(sender, data, progress);
 }