Added new test-files

This commit is contained in:
Holger Börchers 2019-12-16 20:50:46 +01:00
parent 81140d809b
commit 9bf4b675e4
6 changed files with 24 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@ -8,14 +8,26 @@ namespace PhotoRenamer.Test
[TestClass] [TestClass]
public class FilesTest public class FilesTest
{ {
[TestMethod] private readonly string[] _files;
public void FindSupportedFiles()
public FilesTest()
{ {
var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets"); var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Assets");
var files = Base.FilesHelper.FindSupportedFilesRecursively(path).ToArray(); _files = Base.FilesHelper.FindSupportedFilesRecursively(path).ToArray();
Assert.AreEqual(2, files.Length); }
Assert.AreEqual("IMG_3590.CR2", Path.GetFileName(files[0]));
Assert.AreEqual("IMG_3590.JPG", Path.GetFileName(files[1])); [TestMethod, Priority(0)]
public void FindSupportedFiles()
{
Assert.AreEqual(2, _files.Length);
Assert.AreEqual("IMG_20120528_125912.jpg", Path.GetFileName(_files[0]));
Assert.AreEqual("IMG_20120526_170007.jpg", Path.GetFileName(_files[1]));
}
[TestMethod, Priority(1)]
public void GetMetaData()
{
} }
} }
} }

View File

@ -31,6 +31,12 @@
<None Update="Assets\Subfolder\IMG_3590.JPG"> <None Update="Assets\Subfolder\IMG_3590.JPG">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>
<None Update="Assets\IMG_20120528_125912.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Update="Assets\Subfolder\IMG_20120526_170007.jpg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>