public void Remove_Null () { X509CertificateCollection c = new X509CertificateCollection (); // non existing c.Remove (null); }
public void Remove_ByValue () { X509CertificateCollection c = new X509CertificateCollection (); X509Certificate x = null; try { // don't fail in this block c.Add (x509a); Assert.AreEqual (1, c.Count, "Read Count==1"); // works by object reference (not by value) x = new X509Certificate (cert_a); Assert.IsTrue (!Object.ReferenceEquals (x509a, x), "!ReferenceEquals"); } catch {} // fail here! (well for 1.x) c.Remove (x); Assert.AreEqual (0, c.Count, "Remove-by-value Count==0"); }
public void Remove () { X509CertificateCollection c = new X509CertificateCollection (); c.Add (x509a); Assert.AreEqual (1, c.Count, "Count==1"); c.Remove (x509a); Assert.AreEqual (0, c.Count, "Remove Count==0"); }
public void Remove_Unexisting () { X509CertificateCollection c = new X509CertificateCollection (); // non existing c.Remove (x509a); }
public void Remove () { X509CertificateCollection c = new X509CertificateCollection (); c.Add (x509a); AssertEquals ("Count==1", 1, c.Count); c.Remove (x509a); AssertEquals ("Remove,Count==0", 0, c.Count); }