-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added auto-convertion for non-8 bit input images
Slightly updated unit tests
- Loading branch information
Gigas002
committed
Jul 6, 2019
1 parent
acd13ae
commit f08f690
Showing
14 changed files
with
232 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
using System; | ||
using NUnit.Framework; | ||
|
||
// ReSharper disable UnusedVariable | ||
#pragma warning disable 219 | ||
|
||
namespace GTiff2Tiles.Tests.Tests | ||
{ | ||
public class EnumsTests | ||
{ | ||
[SetUp] | ||
public void Setup() { } | ||
|
||
[Test] | ||
public void ImageGdal() | ||
{ | ||
try | ||
{ | ||
string lonLat = Core.Enums.Image.Gdal.LongLat; | ||
string wgs84 = Core.Enums.Image.Gdal.Wgs84; | ||
string typeByte = Core.Enums.Image.Gdal.Byte; | ||
string[] repairTifOptions = Core.Enums.Image.Gdal.RepairTifOptions; | ||
string tempFileName = Core.Enums.Image.Gdal.TempFileName; | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void Algorithms() | ||
{ | ||
try | ||
{ | ||
string crop = Core.Enums.Algorithms.Crop; | ||
string join = Core.Enums.Algorithms.Join; | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void DateTimePatterns() | ||
{ | ||
try | ||
{ | ||
string longWithMs = Core.Enums.DateTimePatterns.LongWithMs; | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void Extensions() | ||
{ | ||
try | ||
{ | ||
string png = Core.Enums.Extensions.Png; | ||
string tif = Core.Enums.Extensions.Tif; | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
using System; | ||
using GTiff2Tiles.Core.Exceptions.Image; | ||
using GTiff2Tiles.Core.Exceptions.Tile; | ||
using NUnit.Framework; | ||
|
||
// ReSharper disable UnusedVariable | ||
|
||
namespace GTiff2Tiles.Tests.Tests | ||
{ | ||
public class ExceptionsTests | ||
{ | ||
[SetUp] | ||
public void Setup() { } | ||
|
||
[Test] | ||
public void ImageGdalException() | ||
{ | ||
try | ||
{ | ||
GdalException gdalException = new GdalException(string.Empty); | ||
GdalException gdalException2 = new GdalException(string.Empty, null); | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void ImageImageException() | ||
{ | ||
try | ||
{ | ||
ImageException imageException = new ImageException(string.Empty); | ||
ImageException imageException2 = new ImageException(string.Empty, null); | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
|
||
[Test] | ||
public void TileTileException() | ||
{ | ||
try | ||
{ | ||
TileException tileException = new TileException(string.Empty); | ||
TileException tileException2 = new TileException(string.Empty, null); | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.IO; | ||
using GTiff2Tiles.Core.Helpers; | ||
using NUnit.Framework; | ||
|
||
namespace GTiff2Tiles.Tests.Tests | ||
{ | ||
public class HelpersTests | ||
{ | ||
[SetUp] | ||
public void SetUp() { } | ||
|
||
[Test] | ||
public void CheckHelperTests() | ||
{ | ||
try | ||
{ | ||
DirectoryInfo examplesDirectoryInfo = Helpers.TestHelper.GetExamplesDirectoryInfo(); | ||
string inputFilePath = Path.Combine(examplesDirectoryInfo.FullName, | ||
Enums.FileSystemEntries.InputDirectoryName, | ||
$"{Enums.FileSystemEntries.Input4326}{Core.Enums.Extensions.Tif}"); | ||
FileInfo inputFileInfo = new FileInfo(inputFilePath); | ||
CheckHelper.CheckDirectory(examplesDirectoryInfo, false); | ||
CheckHelper.CheckInputFile(inputFileInfo); | ||
} | ||
catch (Exception exception) { Assert.Fail(exception.Message); } | ||
|
||
Assert.Pass(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.