Skip to content

Commit

Permalink
Update System.Text.Json (addressing Dependabot alerts), migrate NUnit…
Browse files Browse the repository at this point in the history
… to 4.x
  • Loading branch information
GrzegorzBlok committed Aug 26, 2024
1 parent 318d15a commit 6d4971f
Show file tree
Hide file tree
Showing 21 changed files with 76 additions and 69 deletions.
8 changes: 4 additions & 4 deletions build/FastRsync.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>FastRsyncNet</id>
<version>2.4.0</version>
<version>2.4.1</version>
<authors>Grzegorz Blok</authors>
<owners>Grzegorz Blok</owners>
<license type="expression">Apache-2.0</license>
Expand All @@ -12,17 +12,17 @@
<description>.NET library for file synchronization based on Rsync algorithm. Optimized for speed and data size to achieve best network performance.</description>
<dependencies>
<group targetFramework=".NETFramework4.6.2">
<dependency id="System.Text.Json" version="8.0.0" exclude="Build,Analyzers" />
<dependency id="System.Text.Json" version="8.0.4" exclude="Build,Analyzers" />
<dependency id="System.IO.Hashing" version="8.0.0" exclude="Build,Analyzers" />
</group>

<group targetFramework=".NETStandard2.0">
<dependency id="System.Text.Json" version="8.0.0" exclude="Build,Analyzers" />
<dependency id="System.Text.Json" version="8.0.4" exclude="Build,Analyzers" />
<dependency id="System.IO.Hashing" version="8.0.0" exclude="Build,Analyzers" />
</group>

<group targetFramework="net7.0">
<dependency id="System.Text.Json" version="8.0.0" exclude="Build,Analyzers" />
<dependency id="System.Text.Json" version="8.0.4" exclude="Build,Analyzers" />
<dependency id="System.IO.Hashing" version="8.0.0" exclude="Build,Analyzers" />
</group>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using FastRsync.Signature;
using NSubstitute;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FastRsync.BackwardCompatibilityTests
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

<ItemGroup>
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="NUnit" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Data.HashFunction.Core" Version="2.0.0" />
<PackageReference Include="System.Data.HashFunction.Interfaces" Version="2.0.0" />
Expand Down
4 changes: 2 additions & 2 deletions source/FastRsync.Benchmarks/FastRsync.Benchmarks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
<PackageReference Include="BenchmarkDotNet" Version="0.14.0" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="System.Data.HashFunction.Core" Version="2.0.0" />
<PackageReference Include="System.Data.HashFunction.Interfaces" Version="2.0.0" />
Expand Down
8 changes: 4 additions & 4 deletions source/FastRsync.Tests/Adler32RollingChecksumTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public void Adler32RollingChecksum_CalculatesChecksum()
var checksum4 = new Adler32RollingChecksum().Calculate(data4, 0, data4.Length);

// Assert
Assert.AreEqual(0x4ff907a1, checksum1);
Assert.AreEqual(0x5206079b, checksum2);
//Assert.AreEqual(0x040f0fc1, checksum3); // bug in adler32 implementation https://github.com/OctopusDeploy/Octodiff/issues/16
//Assert.AreEqual(0x2d10357d, checksum4);
Assert.That(checksum1, Is.EqualTo(0x4ff907a1));
Assert.That(checksum2, Is.EqualTo(0x5206079b));
//Assert.That(checksum3, Is.EqualTo(0x040f0fc1)); // bug in adler32 implementation https://github.com/OctopusDeploy/Octodiff/issues/16
//Assert.That(checksum4, Is.EqualTo(0x2d10357d));
}
}
}
8 changes: 4 additions & 4 deletions source/FastRsync.Tests/Adler32RollingChecksumV2Tests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ public void Adler32RollingChecksumV2_CalculatesChecksum()
var checksum4 = new Adler32RollingChecksumV2().Calculate(data4, 0, data4.Length);

// Assert
Assert.AreEqual(0x4ff907a1, checksum1);
Assert.AreEqual(0x5206079b, checksum2);
Assert.AreEqual(0x040f0fc1, checksum3);
Assert.AreEqual(0x2d10357d, checksum4);
Assert.That(checksum1, Is.EqualTo(0x4ff907a1));
Assert.That(checksum2, Is.EqualTo(0x5206079b));
Assert.That(checksum3, Is.EqualTo(0x040f0fc1));
Assert.That(checksum4, Is.EqualTo(0x2d10357d));
}
}
}
1 change: 1 addition & 0 deletions source/FastRsync.Tests/BackwardCompatibilityTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using FastRsync.Diagnostics;
using FastRsync.Signature;
using NSubstitute;
using NUnit.Framework.Legacy;

namespace FastRsync.Tests
{
Expand Down
16 changes: 8 additions & 8 deletions source/FastRsync.Tests/CommonAsserts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ public static void ValidateSignature(Stream signatureStream, IHashAlgorithm hash
{
signatureStream.Seek(0, SeekOrigin.Begin);
var sig = new SignatureReader(signatureStream, null).ReadSignature();
Assert.AreEqual(RsyncFormatType.FastRsync, sig.Type);
Assert.AreEqual(hashAlgorithm.Name, sig.HashAlgorithm.Name);
Assert.AreEqual(hashAlgorithm.Name, sig.Metadata.ChunkHashAlgorithm);
Assert.AreEqual(hashAlgorithm.HashLengthInBytes, sig.HashAlgorithm.HashLengthInBytes);
Assert.AreEqual(rollingAlgorithm.Name, sig.RollingChecksumAlgorithm.Name);
Assert.AreEqual(rollingAlgorithm.Name, sig.Metadata.RollingChecksumAlgorithm);
Assert.AreEqual("MD5", sig.Metadata.BaseFileHashAlgorithm);
Assert.AreEqual(baseFileHash, sig.Metadata.BaseFileHash);
Assert.That(sig.Type, Is.EqualTo(RsyncFormatType.FastRsync));
Assert.That(sig.HashAlgorithm.Name, Is.EqualTo(hashAlgorithm.Name));
Assert.That(sig.Metadata.ChunkHashAlgorithm, Is.EqualTo(hashAlgorithm.Name));
Assert.That(sig.HashAlgorithm.HashLengthInBytes, Is.EqualTo(hashAlgorithm.HashLengthInBytes));
Assert.That(sig.RollingChecksumAlgorithm.Name, Is.EqualTo(rollingAlgorithm.Name));
Assert.That(sig.Metadata.RollingChecksumAlgorithm, Is.EqualTo(rollingAlgorithm.Name));
Assert.That(sig.Metadata.BaseFileHashAlgorithm, Is.EqualTo("MD5"));
Assert.That(sig.Metadata.BaseFileHash, Is.EqualTo(baseFileHash));
}
}
}
28 changes: 14 additions & 14 deletions source/FastRsync.Tests/DeltaReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ public void BinaryDeltaReader_ReadsLegacyDelta()

// Assert
var hashAlgorithm = SupportedAlgorithms.Hashing.Default();
Assert.AreEqual(RsyncFormatType.FastRsync, target.Type);
Assert.AreEqual(hashAlgorithm.Name, target.HashAlgorithm.Name);
Assert.AreEqual(hashAlgorithm.HashLengthInBytes, target.HashAlgorithm.HashLengthInBytes);
Assert.AreEqual(FastRsyncLegacyDeltaExpectedFileHash, target.Metadata.ExpectedFileHash);
Assert.AreEqual("MD5", target.Metadata.ExpectedFileHashAlgorithm);
Assert.AreEqual(hashAlgorithm.Name, target.Metadata.HashAlgorithm);
Assert.Null(target.Metadata.BaseFileHash);
Assert.Null(target.Metadata.BaseFileHashAlgorithm);
Assert.That(target.Type, Is.EqualTo(RsyncFormatType.FastRsync));
Assert.That(target.HashAlgorithm.Name, Is.EqualTo(hashAlgorithm.Name));
Assert.That(target.HashAlgorithm.HashLengthInBytes, Is.EqualTo(hashAlgorithm.HashLengthInBytes));
Assert.That(target.Metadata.ExpectedFileHash, Is.EqualTo(FastRsyncLegacyDeltaExpectedFileHash));
Assert.That(target.Metadata.ExpectedFileHashAlgorithm, Is.EqualTo("MD5"));
Assert.That(target.Metadata.HashAlgorithm, Is.EqualTo(hashAlgorithm.Name));
Assert.That(target.Metadata.BaseFileHash, Is.Null);
Assert.That(target.Metadata.BaseFileHashAlgorithm, Is.Null);
}

[Test]
Expand All @@ -65,12 +65,12 @@ public void LegacyBinaryDeltaReader_ReadsDelta()

// Assert
var hashAlgorithm = SupportedAlgorithms.Hashing.Default();
Assert.AreEqual(hashAlgorithm.Name, target.HashAlgorithm.Name);
Assert.AreEqual(hashAlgorithm.HashLengthInBytes, target.HashAlgorithm.HashLengthInBytes);
Assert.AreEqual(RsyncFormatType.FastRsync, target.Type);
Assert.IsNotEmpty(target.Metadata.ExpectedFileHash);
Assert.AreEqual("MD5", target.Metadata.ExpectedFileHashAlgorithm);
Assert.AreEqual(hashAlgorithm.Name, target.Metadata.HashAlgorithm);
Assert.That(target.HashAlgorithm.Name, Is.EqualTo(hashAlgorithm.Name));
Assert.That(target.HashAlgorithm.HashLengthInBytes, Is.EqualTo(hashAlgorithm.HashLengthInBytes));
Assert.That(target.Type, Is.EqualTo(RsyncFormatType.FastRsync));
Assert.That(target.Metadata.ExpectedFileHash, Is.Not.Null.And.Not.Empty);
Assert.That(target.Metadata.ExpectedFileHashAlgorithm, Is.EqualTo("MD5"));
Assert.That(target.Metadata.HashAlgorithm, Is.EqualTo(hashAlgorithm.Name));
}
}
}
8 changes: 4 additions & 4 deletions source/FastRsync.Tests/FastRsync.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.19.1" />
<PackageReference Include="NUnit" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Azure.Storage.Blobs" Version="12.21.2" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
<PackageReference Include="System.Data.HashFunction.Core" Version="2.0.0" />
<PackageReference Include="System.Data.HashFunction.Interfaces" Version="2.0.0" />
Expand Down
16 changes: 8 additions & 8 deletions source/FastRsync.Tests/GZipTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public void GZip_CompressData()
var destStream = CompressData(data);

// Additional asserts
Assert.AreEqual(6982738, destStream.Length);
Assert.That(destStream.Length, Is.EqualTo(6982738));
}

private static MemoryStream CompressData(byte[] data)
Expand All @@ -58,7 +58,7 @@ private static MemoryStream CompressData(byte[] data)
}

var dataOutput = decompressedStream.ToArray();
Assert.AreEqual(data, dataOutput);
Assert.That(dataOutput, Is.EqualTo(data));
return destStream;
}

Expand Down Expand Up @@ -98,7 +98,7 @@ public void GZip_CompressData_RsyncSignatureAndPatch()
var deltaStream = FullCompressedRsyncFlow(basisStream, newFileStream);

// Not calculated, taken from the valid flow
Assert.AreEqual(662628, deltaStream.Length);
Assert.That(deltaStream.Length, Is.EqualTo(662628));
}

private static MemoryStream FullCompressedRsyncFlow(MemoryStream basisStream, MemoryStream newFileStream)
Expand Down Expand Up @@ -135,7 +135,7 @@ private static MemoryStream FullCompressedRsyncFlow(MemoryStream basisStream, Me
deltaApplier.HashCheck(deltaReader, patchedCompressedStream);

// Assert
Assert.AreEqual(newFileStreamCompressed.ToArray(), patchedCompressedStream.ToArray());
Assert.That(newFileStreamCompressed.ToArray(), Is.EqualTo(patchedCompressedStream.ToArray()));

patchedCompressedStream.Seek(0, SeekOrigin.Begin);
var decompressedStream = new MemoryStream();
Expand All @@ -145,7 +145,7 @@ private static MemoryStream FullCompressedRsyncFlow(MemoryStream basisStream, Me
}

var dataOutput = decompressedStream.ToArray();
Assert.AreEqual(newFileStream.ToArray(), dataOutput);
Assert.That(dataOutput, Is.EqualTo(newFileStream.ToArray()));
return deltaStream;
}

Expand Down Expand Up @@ -185,7 +185,7 @@ public async Task GZip_CompressDataAsync_RsyncSignatureAndPatch()
var deltaStream = await FullCompressedRsyncFlowAsync(basisStream, newFileStream);

// Not calculated, taken from the valid flow
Assert.AreEqual(662628, deltaStream.Length);
Assert.That(deltaStream.Length, Is.EqualTo(662628));
}

private static async Task<MemoryStream> FullCompressedRsyncFlowAsync(MemoryStream basisStream, MemoryStream newFileStream)
Expand Down Expand Up @@ -224,7 +224,7 @@ await deltaBuilder.BuildDeltaAsync(newFileStreamCompressed,
await deltaApplier.HashCheckAsync(deltaReader, patchedCompressedStream);

// Assert
Assert.AreEqual(newFileStreamCompressed.ToArray(), patchedCompressedStream.ToArray());
Assert.That(newFileStreamCompressed.ToArray(), Is.EqualTo(patchedCompressedStream.ToArray()));

patchedCompressedStream.Seek(0, SeekOrigin.Begin);
var decompressedStream = new MemoryStream();
Expand All @@ -233,7 +233,7 @@ await deltaBuilder.BuildDeltaAsync(newFileStreamCompressed,
await gz.CopyToAsync(decompressedStream);
}

Assert.AreEqual(newFileStream.ToArray(), decompressedStream.ToArray());
Assert.That(newFileStream.ToArray(), Is.EqualTo(decompressedStream.ToArray()));
return deltaStream;
}
}
Expand Down
6 changes: 3 additions & 3 deletions source/FastRsync.Tests/HashTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void XxHash64StaticBackwardCompatibility(int dataLength)
Array.Reverse(systemXxHash64Dest);

// Assert
Assert.AreEqual(dataXxHash64Dest, systemXxHash64Dest);
Assert.That(systemXxHash64Dest, Is.EqualTo(dataXxHash64Dest));
}

[Test]
Expand Down Expand Up @@ -65,7 +65,7 @@ public void XxHash64BackwardCompatibility(int dataLength)
Array.Reverse(systemXxHash64Dest);

// Assert
Assert.AreEqual(dataXxHash64Dest, systemXxHash64Dest);
Assert.That(systemXxHash64Dest, Is.EqualTo(dataXxHash64Dest));
}

[Test]
Expand Down Expand Up @@ -104,7 +104,7 @@ public async Task XxHash64StreamBackwardCompatibility(int dataLength)
Array.Reverse(systemXxHash64Dest);

// Assert
Assert.AreEqual(dataXxHash64Dest, systemXxHash64Dest);
Assert.That(systemXxHash64Dest, Is.EqualTo(dataXxHash64Dest));
}
}

1 change: 1 addition & 0 deletions source/FastRsync.Tests/PatchingAsyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
using FastRsync.Tests.OctodiffLegacy;
using NSubstitute;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FastRsync.Tests
{
Expand Down
5 changes: 3 additions & 2 deletions source/FastRsync.Tests/PatchingBigFilesTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
using NSubstitute;
using NUnit.Framework;
using System.Security.Cryptography;
using NUnit.Framework.Legacy;

namespace FastRsync.Tests
{
Expand Down Expand Up @@ -44,8 +45,8 @@ public void PatchingSyncXXHash_BigFile(string originalFileName, string newFileNa
}

// Assert
Assert.AreEqual(new FileInfo(newFileName).Length, new FileInfo(patchedFileName).Length);
Assert.True(CompareFilesByHash(newFileName, patchedFileName));
Assert.That(new FileInfo(newFileName).Length, Is.EqualTo(new FileInfo(patchedFileName).Length));
Assert.That(CompareFilesByHash(newFileName, patchedFileName), Is.True);
progressReporter.Received().Report(Arg.Any<ProgressReport>());
}
catch (Exception e)
Expand Down
1 change: 1 addition & 0 deletions source/FastRsync.Tests/PatchingSyncTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using FastRsync.Tests.OctodiffLegacy;
using NSubstitute;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FastRsync.Tests
{
Expand Down
1 change: 1 addition & 0 deletions source/FastRsync.Tests/SignatureBuilderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using FastRsync.Signature;
using NSubstitute;
using NUnit.Framework;
using NUnit.Framework.Legacy;

namespace FastRsync.Tests
{
Expand Down
8 changes: 4 additions & 4 deletions source/FastRsync.Tests/SignatureReaderTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ public void SignatureReader_ReadsOctodiffSignature()

// Assert
var hashAlgorithm = SupportedAlgorithms.Hashing.Default();
Assert.AreEqual(RsyncFormatType.Octodiff, target.Type);
Assert.AreEqual(hashAlgorithm.Name, target.HashAlgorithm.Name);
Assert.AreEqual(hashAlgorithm.HashLengthInBytes, target.HashAlgorithm.HashLengthInBytes);
Assert.AreEqual(new Adler32RollingChecksum().Name, target.RollingChecksumAlgorithm.Name);
Assert.That(target.Type, Is.EqualTo(RsyncFormatType.Octodiff) );
Assert.That(target.HashAlgorithm.Name, Is.EqualTo(hashAlgorithm.Name));
Assert.That(target.HashAlgorithm.HashLengthInBytes, Is.EqualTo(hashAlgorithm.HashLengthInBytes));
Assert.That(target.RollingChecksumAlgorithm.Name, Is.EqualTo(new Adler32RollingChecksum().Name));

progressReporter.Received().Report(Arg.Any<ProgressReport>());
}
Expand Down
8 changes: 4 additions & 4 deletions source/FastRsync/FastRsync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<PackageTags>sync rsync synchronization</PackageTags>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<PackageLicenseExpression>Apache-2.0</PackageLicenseExpression>
<AssemblyVersion>2.4.0</AssemblyVersion>
<FileVersion>2.4.0</FileVersion>
<Version>2.4.0</Version>
<AssemblyVersion>2.4.1</AssemblyVersion>
<FileVersion>2.4.1</FileVersion>
<Version>2.4.1</Version>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
Expand All @@ -29,7 +29,7 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="System.Text.Json" Version="8.0.4" />
<PackageReference Include="System.IO.Hashing" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down
5 changes: 3 additions & 2 deletions source/Octodiff.Tests/DeltaFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using System.Text.RegularExpressions;
using NUnit.Framework;
using Octodiff.Tests.Util;
using NUnit.Framework.Legacy;

namespace Octodiff.Tests
{
Expand Down Expand Up @@ -62,8 +63,8 @@ public void DeltaOfChangedFileShouldResultInNewDataSegments(string name, int num
var actualDifference = Math.Abs(newSize - originalSize);
var deltaToActualRatio = (double) deltaSize/actualDifference;
Trace.WriteLine(string.Format("Delta ratio: {0:n3}", deltaToActualRatio));
Assert.IsTrue(deltaSize * 2 < newSize, "Delta should be at least half the new file size");
Assert.IsTrue(0.80 <= deltaToActualRatio && deltaToActualRatio <= 1.60, "Delta should be pretty close to the actual file differences");
Assert.That(deltaSize * 2 < newSize, Is.True, "Delta should be at least half the new file size");
Assert.That(0.80 <= deltaToActualRatio && deltaToActualRatio <= 1.60, Is.True, "Delta should be pretty close to the actual file differences");
}
}
}
4 changes: 2 additions & 2 deletions source/Octodiff.Tests/Octodiff.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
<ProjectReference Include="..\Octodiff\Octodiff.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="NUnit" Version="4.2.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
</ItemGroup>
<ItemGroup>
<Reference Include="System.Data.DataSetExtensions" />
Expand Down
2 changes: 1 addition & 1 deletion source/Octodiff.Tests/SignatureFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public void ShouldCreateSignature(string name, int numberOfFiles, OctodiffAppVar
Trace.WriteLine(string.Format("Basis size: {0:n0}", basisSize));
Trace.WriteLine(string.Format("Signature size: {0:n0}", signatureSize));
Trace.WriteLine(string.Format("Signature ratio: {0:n3}", signatureSizePercentageOfBasis));
Assert.IsTrue(0.006 <= signatureSizePercentageOfBasis && signatureSizePercentageOfBasis <= 0.014);
Assert.That(0.006 <= signatureSizePercentageOfBasis && signatureSizePercentageOfBasis <= 0.014, Is.True);
}

[Test]
Expand Down

0 comments on commit 6d4971f

Please sign in to comment.