public void SeekThrowsWithInvalidPosition
        (
            long fileSize,
            long defaultPosition,
            long offset,
            SeekOrigin origin
        )
        {
            // Create the download stream.
            var stream = new FileDownloadStreamProxy(Mock.Of <ObjectFile>(), Mock.Of <Vault>())
            {
                Position = defaultPosition
            };

            Assert.AreEqual(defaultPosition, stream.Position);

            // Attempt to seek.
            stream.Position = defaultPosition;
            stream.Seek(offset, origin);
        }
        [DataRow(100, 90, 20, SeekOrigin.Current, 110)]         // Allow position > length.
        public void SeekProcessesValidPosition
        (
            long fileSize,
            long defaultPosition,
            long offset,
            SeekOrigin origin,
            long expectedNewPosition
        )
        {
            // Create the download stream.
            var stream = new FileDownloadStreamProxy(Mock.Of <ObjectFile>(), Mock.Of <Vault>())
            {
                Position = defaultPosition
            };

            Assert.AreEqual(defaultPosition, stream.Position);
            stream.SetLength(fileSize);
            Assert.AreEqual(fileSize, stream.Length);

            // Attempt to seek.
            Assert.AreEqual(expectedNewPosition, stream.Seek(offset, origin));
        }