public async Task RunTest()
{
X509Certificate2 serverCertificate = Configuration.Certificates.GetServerCertificate();
string serverHost = serverCertificate.GetNameInfo(X509NameType.SimpleName, false);
X509CertificateCollection clientCertificates = new X509CertificateCollection();
clientCertificates.Add(Configuration.Certificates.GetClientCertificate());
var tasks = new Task[2];
tasks[0] = AuthenticateClient(serverHost, clientCertificates, checkCertificateRevocation: false);
tasks[1] = AuthenticateServer(serverCertificate, clientCertificateRequired:true, checkCertificateRevocation:false);
await Task.WhenAll(tasks);
if (PlatformDetection.IsWindows && PlatformDetection.WindowsVersion >= 10)
{
Assert.True(_clientStream.HashAlgorithm == HashAlgorithmType.Sha256 ||
_clientStream.HashAlgorithm == HashAlgorithmType.Sha384 ||
_clientStream.HashAlgorithm == HashAlgorithmType.Sha512);
}
}