diff --git a/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj b/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj index 13cbe95a..3e8b5cc0 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj +++ b/src/Arkivverket.Arkade.Core.Tests/Arkivverket.Arkade.Core.Tests.csproj @@ -28,6 +28,8 @@ + + @@ -39,6 +41,12 @@ + + PreserveNewest + + + PreserveNewest + PreserveNewest diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/docx.docx b/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/docx.docx new file mode 100644 index 00000000..7873b718 Binary files /dev/null and b/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/docx.docx differ diff --git a/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/pdf.pdf b/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/pdf.pdf new file mode 100644 index 00000000..b279da7e Binary files /dev/null and b/src/Arkivverket.Arkade.Core.Tests/TestData/DiskUsage/pdf.pdf differ diff --git a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs index 030aa277..6b53d494 100644 --- a/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs +++ b/src/Arkivverket.Arkade.Core.Tests/Util/FileSystemInfoSizeCalculatorTest.cs @@ -22,7 +22,7 @@ public FileSystemInfoSizeCalculatorTest() [Trait("Category", "Integration")] public void ShouldCalculateCorrectTotalFileSize() { - string pathToFiles = Path.Combine("TestData", "FileTypes"); + string pathToFiles = Path.Combine("TestData", "DiskUsage"); var fileSystemInfoSizeCalculator = new FileSystemInfoSizeCalculator(_statusEventHandler); @@ -33,15 +33,9 @@ public void ShouldCalculateCorrectTotalFileSize() } long docxByteSize = 12895L; - long zipByteSize = 89899L; long pdfByteSize = 27182L; - long pdfA1bByteSize = 34155L; - long pdfA3aByteSize = 32506L; - long zip2ByteSize = 921L; - long tarByteSize = 7168L; - long totalSize = docxByteSize + zipByteSize + pdfByteSize + pdfA1bByteSize + pdfA3aByteSize + zip2ByteSize + tarByteSize; - _totalFileSize.Should().Be(totalSize); // 7 files which of 3 are archive files + _totalFileSize.Should().Be(docxByteSize + pdfByteSize); } private void OnTargetSizeCalculatorFinished(object o, TargetSizeCalculatorEventArgs e)