public void TestEquals() { var settings = new SslSettings(); var clone = settings.Clone(); Assert.Equal(settings, clone); clone = settings.Clone(); clone.CheckCertificateRevocation = !settings.CheckCertificateRevocation; Assert.NotEqual(settings, clone); clone = settings.Clone(); var certificateFileName = GetTestCertificateFileName(); clone.ClientCertificates = new[] { new X509Certificate2(certificateFileName, "password") }; Assert.NotEqual(settings, clone); Assert.NotEqual(clone, settings); clone = settings.Clone(); clone.ClientCertificateSelectionCallback = ClientCertificateSelectionCallback; Assert.NotEqual(settings, clone); clone = settings.Clone(); clone.EnabledSslProtocols = SslProtocols.Tls12; Assert.NotEqual(settings, clone); clone = settings.Clone(); clone.ServerCertificateValidationCallback = ServerCertificateValidationCallback; Assert.NotEqual(settings, clone); }
public void TestEquals() { var settings = new SslSettings(); var clone = settings.Clone(); Assert.AreEqual(settings, clone); clone = settings.Clone(); clone.CheckCertificateRevocation = !settings.CheckCertificateRevocation; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.ClientCertificates = new[] { new X509Certificate2("testcert.pfx", "password") }; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.ClientCertificateSelectionCallback = ClientCertificateSelectionCallback; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.EnabledSslProtocols = SslProtocols.Tls; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.ServerCertificateValidationCallback = ServerCertificateValidationCallback; Assert.AreNotEqual(settings, clone); }
public void TestEquals() { RequirePlatform.Check().SkipWhen(SupportedOperatingSystem.MacOS, SupportedTargetFramework.NetStandard15); var settings = new SslSettings(); var clone = settings.Clone(); Assert.Equal(settings, clone); clone = settings.Clone(); clone.CheckCertificateRevocation = !settings.CheckCertificateRevocation; Assert.NotEqual(settings, clone); clone = settings.Clone(); var certificateFileName = GetTestCertificateFileName(); clone.ClientCertificates = new[] { new X509Certificate2(certificateFileName, "password") }; Assert.NotEqual(settings, clone); clone = settings.Clone(); clone.ClientCertificateSelectionCallback = ClientCertificateSelectionCallback; Assert.NotEqual(settings, clone); clone = settings.Clone(); clone.EnabledSslProtocols = SslProtocols.Tls12; Assert.NotEqual(settings, clone); clone = settings.Clone(); clone.ServerCertificateValidationCallback = ServerCertificateValidationCallback; Assert.NotEqual(settings, clone); }
public void TestClone() { var settings = new SslSettings { CheckCertificateRevocation = false, ClientCertificates = new[] { new X509Certificate2("testcert.pfx", "password") }, ClientCertificateSelectionCallback = ClientCertificateSelectionCallback, EnabledSslProtocols = SslProtocols.Tls, ServerCertificateValidationCallback = ServerCertificateValidationCallback }; var clone = settings.Clone(); Assert.AreEqual(settings, clone); }
public void TestClone() { var settings = new SslSettings { CheckCertificateRevocation = false, ClientCertificates = new[] { new X509Certificate2("testcert.pfx", "password") }, ClientCertificateSelectionCallback = ClientCertificateSelectionCallback, EnabledSslProtocols = SslProtocols.Tls, ServerCertificateValidationCallback = ServerCertificateValidationCallback }; var clone = settings.Clone(); Assert.AreEqual(settings, clone); }
public void TestEquals() { var settings = new SslSettings(); var clone = settings.Clone(); Assert.AreEqual(settings, clone); clone = settings.Clone(); clone.CheckCertificateRevocation = !settings.CheckCertificateRevocation; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.ClientCertificates = new[] { new X509Certificate2("testcert.pfx", "password") }; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.ClientCertificateSelectionCallback = ClientCertificateSelectionCallback; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.EnabledSslProtocols = SslProtocols.Tls; Assert.AreNotEqual(settings, clone); clone = settings.Clone(); clone.ServerCertificateValidationCallback = ServerCertificateValidationCallback; Assert.AreNotEqual(settings, clone); }