public async Task Pause ()
 {
     var provider = new StreamProvider (Engine, "testDir", Torrent);
     await provider.StartAsync ();
     await provider.PauseAsync ();
     Assert.IsTrue (provider.Active);
     Assert.IsTrue (provider.Paused);
 }
 public void PauseWithoutStarting ()
 {
     var provider = new StreamProvider (Engine, "testDir", Torrent);
     Assert.ThrowsAsync<InvalidOperationException> (() => provider.PauseAsync ());
 }