public void CopyFrom () { Oid o = new Oid ("1.2.3"); byte[] data = (byte[])asnNullBytes.Clone (); AsnEncodedData aed = new AsnEncodedData (o, asnNullBytes); AsnEncodedData copy = new AsnEncodedData ((Oid)null, new byte [0]); copy.CopyFrom (aed); Assert.AreEqual (aed.Oid.Value, copy.Oid.Value, "Oid 1"); Assert.AreEqual (aed.Format (true), copy.Format (true), "Format 1"); aed.Oid = new Oid ("1.2.4"); aed.RawData = new byte[1]; Assert.AreEqual ("1.2.3", copy.Oid.Value, "Oid 2"); Assert.AreEqual (asnNullString, copy.Format (true), "Format 2"); }
public void CopyFrom_Null () { AsnEncodedData aed = new AsnEncodedData ((Oid)null, asnNullBytes); aed.CopyFrom (null); }