public void WarpNullOutput() { _gdalWarpOptions.AddRange(GdalWorker.SrsEpsg3857); Assert.ThrowsAsync <ArgumentNullException>(async() => await GdalWorker.WarpAsync(_in4326, null, _gdalWarpOptions.ToArray(), _progress).ConfigureAwait(false)); }
public void WarpNonExistingInput() { _gdalWarpOptions.AddRange(GdalWorker.SrsEpsg3857); Assert.ThrowsAsync <FileNotFoundException>(async() => await GdalWorker.WarpAsync(ShouldFail, _outPath, _gdalWarpOptions.ToArray(), _progress).ConfigureAwait(false)); }
public void Warp4326To3857() { _gdalWarpOptions.AddRange(GdalWorker.SrsEpsg3857); Assert.DoesNotThrowAsync(async() => { await GdalWorker.WarpAsync(_in4326, _outPath, _gdalWarpOptions.ToArray(), _progress).ConfigureAwait(false); CheckHelper.CheckFile(_outPath); }); File.Delete(_outPath); }
public void WarpExistingOutput() { FileStream fs = File.Create(_outPath); // Must dispose explicitly to delete correctly fs.Dispose(); _gdalWarpOptions.AddRange(GdalWorker.SrsEpsg3857); Assert.ThrowsAsync <FileException>(async() => await GdalWorker.WarpAsync(_in4326, _outPath, _gdalWarpOptions.ToArray(), _progress).ConfigureAwait(false)); File.Delete(_outPath); }
public void WarpNullOptions() => Assert.ThrowsAsync <ArgumentNullException>(async() => await GdalWorker.WarpAsync(_in4326, _outPath, null, _progress).ConfigureAwait(false));