Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S.S.C.Algorithms: Fix duplicate theories warning #35810

Merged
merged 1 commit into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,44 @@ namespace System.Security.Cryptography.Hashing.Algorithms.Tests
{
public class BlockSizeValueTests
{
public static IEnumerable<object[]> GetBlockSizeValue()
[Fact]
public static void BlockSizeValueTest_HMACMD5()
{
return new[]
{
new object[] { new HMACMD5Test().GetBlockSizeValue(), 64 },
new object[] { new HMACSHA1Test().GetBlockSizeValue(), 64 },
new object[] { new HMACSHA256Test().GetBlockSizeValue(), 64 },
new object[] { new HMACSHA384Test().GetBlockSizeValue(), 128 },
new object[] { new HMACSHA512Test().GetBlockSizeValue(), 128 },
};
int hmacBlockSizeValue = new HMACMD5Test().GetBlockSizeValue();
const int ExpectedBlockSize = 64;
Assert.Equal(ExpectedBlockSize, hmacBlockSizeValue);
}

[Theory]
[MemberData(nameof(GetBlockSizeValue))]
public static void BlockSizeValueTest(int hmacBlockSizeValue, int expectedBlockSizeValue)
[Fact]
public static void BlockSizeValueTest_HMACSHA1()
{
Assert.Equal(expectedBlockSizeValue, hmacBlockSizeValue);
int hmacBlockSizeValue = new HMACSHA1Test().GetBlockSizeValue();
const int ExpectedBlockSize = 64;
Assert.Equal(ExpectedBlockSize, hmacBlockSizeValue);
}

[Fact]
public static void BlockSizeValueTest_HMACSHA256()
{
int hmacBlockSizeValue = new HMACSHA256Test().GetBlockSizeValue();
const int ExpectedBlockSize = 64;
Assert.Equal(ExpectedBlockSize, hmacBlockSizeValue);
}

[Fact]
public static void BlockSizeValueTest_HMACSHA384()
{
int hmacBlockSizeValue = new HMACSHA384Test().GetBlockSizeValue();
const int ExpectedBlockSize = 128;
Assert.Equal(ExpectedBlockSize, hmacBlockSizeValue);
}

[Fact]
public static void BlockSizeValueTest_HMACSHA512()
{
int hmacBlockSizeValue = new HMACSHA512Test().GetBlockSizeValue();
const int ExpectedBlockSize = 128;
Assert.Equal(ExpectedBlockSize, hmacBlockSizeValue);
}
}

Expand Down