Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 2133fc4

Browse files
authored
use ConditionalFact instead of SkipOnTargetFramework
1 parent 394c0bf commit 2133fc4

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/System.Security.Cryptography.Xml/tests/Samples/SigningVerifyingX509Cert.cs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ public class SigningVerifyingX509Cert
1919
<example>
2020
<test>some text node</test>
2121
</example>";
22+
23+
private static bool SupportsDecryptValue => !PlatformDetection.IsFullFramework || PlatformDetection.IsNetfx462OrNewer();
2224

2325
private static void SignXml(XmlDocument doc, AsymmetricAlgorithm key)
2426
{
@@ -59,14 +61,8 @@ private static bool VerifyXml(string signedXmlText, X509Certificate2 certificate
5961
return signedXml.CheckSignature(certificate, verifySignatureOnly: true);
6062
}
6163

62-
[Fact]
63-
[SkipOnTargetFramework(
64-
TargetFrameworkMonikers.Net45 |
65-
TargetFrameworkMonikers.Net451 |
66-
TargetFrameworkMonikers.Net452 |
67-
TargetFrameworkMonikers.Net46 |
68-
TargetFrameworkMonikers.Net461,
69-
"https://github.com/dotnet/corefx/issues/19270")]
64+
// https://github.com/dotnet/corefx/issues/19270
65+
[ConditionalFact(nameof(SupportsDecryptValue))]
7066
public void SignedXmlHasCertificateVerifiableSignature()
7167
{
7268
using (X509Certificate2 x509cert = TestHelpers.GetSampleX509Certificate())

0 commit comments

Comments
 (0)