public async Task ListFirstTorrentNameParsedCorrectly() { SetServerResponse("multiple-torrents"); IEnumerable <HitAndRunTorrent> torrents = await endPoint.List().ConfigureAwait(false); HitAndRunTorrent firstTorrent = torrents.First(); Assert.That("A.karate.kolyok.2010.1080p.RETAiL.BluRay.x264.HUN-BiTZo...", Is.EqualTo(firstTorrent.UploadName)); }
public async Task ListFirstTorrentIDParsedCorrectly() { SetServerResponse("multiple-torrents"); IEnumerable <HitAndRunTorrent> torrents = await endPoint.List().ConfigureAwait(false); HitAndRunTorrent firstTorrent = torrents.First(); Assert.That(830948, Is.EqualTo(firstTorrent.ID)); }
public async Task ListFirstTorrentRatioParsedCorrectly() { SetServerResponse("multiple-torrents"); DateTime currentTime = DateTime.Now; IEnumerable <HitAndRunTorrent> torrents = await endPoint.List().ConfigureAwait(false); HitAndRunTorrent firstTorrent = torrents.First(); Assert.That(firstTorrent.Ratio, Is.EqualTo(0.013f)); }
public async Task ListFirstTorrentHitAndRunParsedCorrectly() { SetServerResponse("multiple-torrents"); DateTime currentTime = DateTime.Now; IEnumerable <HitAndRunTorrent> torrents = await endPoint.List().ConfigureAwait(false); HitAndRunTorrent firstTorrent = torrents.First(); Assert.That(currentTime.Subtract(firstTorrent.HitAndRunEnd).TotalSeconds, Is.LessThan(2)); }
/// <inheritdoc /> public Task <Torrent> Get(HitAndRunTorrent torrent) { return(Get(torrent.ID)); }