Skip to content

Commit bca7e05

Browse files
authored
Add legacy preprocessor define condition to Factory Tests
Signed-off-by: Xen <lordofxen@deskasoft.com>
1 parent 4bf4f34 commit bca7e05

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

HashifyNet.UnitTests/Core/FactoryTests.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,11 @@ public void Factory_ComputeCryptographicHashes_Works()
119119
IHashFunctionBase[] functions = HashFactory.CreateHashAlgorithms(HashFunctionType.Cryptographic, new Dictionary<Type, IHashConfigBase>()
120120
{
121121
{ typeof(IArgon2id), new Argon2idConfigProfileOWASP() }
122-
}, HashFactory.GetUnavailableHashAlgorithms());
122+
}
123+
#if !LEGACY
124+
, HashFactory.GetUnavailableHashAlgorithms()
125+
#endif
126+
);
123127

124128
Assert.NotNull(functions);
125129
Assert.NotEmpty(functions);
@@ -172,12 +176,14 @@ public void Factory_GetConcreteConfigs_Works()
172176
Assert.All(configs, item => Assert.Contains(typeof(IHashConfigBase), item.GetInterfaces()));
173177
}
174178

179+
#if !LEGACY
175180
[Fact]
176181
public void Factory_GetUnavailableHashAlgorithms_Works()
177182
{
178183
var unavailable = HashFactory.GetUnavailableHashAlgorithms();
179184
Assert.NotNull(unavailable);
180185
}
186+
#endif
181187

182188
[Fact]
183189
public void Factory_CreateDefaultConcreteConfig_Null_Throws()

0 commit comments

Comments
 (0)