Skip to content

Commit c82002d

Browse files
committed
Fixes a bug where check command reported invalid number of files
without metadata.
1 parent 1858952 commit c82002d

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

CameraUtility.Tests/CheckFilesCommandTests.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,9 @@ public void Check_directory_when_all_files_are_camera_files_but_some_are_missing
7272
NewImageFileTags("2010:01:12 13:14:15", "42")),
7373
(
7474
$"{sourceDirPath}/IMG_2345.JPEG",
75+
Array.Empty<ITag>()),
76+
(
77+
$"{sourceDirPath}/IMG_3456.jpg",
7578
Array.Empty<ITag>())
7679
};
7780
SetupFileSystemStub(fixture, sourceDirPath, sourceFiles.Select(f => f.sourceFile));
@@ -86,9 +89,10 @@ public void Check_directory_when_all_files_are_camera_files_but_some_are_missing
8689
result.Should().Be(0);
8790
var output = consoleTextWriterMock.ToString();
8891
output.Should().Be(
89-
"Found 2 camera file(s). Missing metadata in 1 file(s).\n" +
92+
"Found 3 camera file(s). Missing metadata in 2 file(s).\n" +
9093
"Following files are missing metadata:\n" +
91-
$"{sourceDirPath}/IMG_2345.JPEG\n");
94+
$"{sourceDirPath}/IMG_2345.JPEG\n" +
95+
$"{sourceDirPath}/IMG_3456.jpg\n");
9296
}
9397

9498
[Fact]

CameraUtility/CameraFilePath.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
using System.Diagnostics;
2+
13
namespace CameraUtility
24
{
5+
[DebuggerDisplay("{" + nameof(Value) + "}")]
36
public sealed record CameraFilePath(string Value) :
47
TypedOption<string>(Value)
58
{

CameraUtility/CameraUtility.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333

3434
<ItemGroup>
3535
<Folder Include="Properties\" />
36-
<Folder Include="Utils" />
3736
<None Include="..\LICENSE.txt">
3837
<Pack>True</Pack>
3938
<PackagePath />

CameraUtility/Commands/Check/Output/ConsoleOutput.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ internal void PrintSummary(
3838
}
3939

4040
WriteLine(
41-
$" Missing metadata in {cameraFilesCounter - cameraFilesWithoutMetadata.Count} file(s).",
41+
$" Missing metadata in {cameraFilesWithoutMetadata.Count} file(s).",
4242
ConsoleColor.Red);
4343
WriteLine("Following files are missing metadata:");
4444
foreach (var cameraFile in cameraFilesWithoutMetadata)

0 commit comments

Comments
 (0)