public void GetXml_FromLoadXml_CachesXml() { EncryptionMethod method = new EncryptionMethod(); XmlDocument document = new XmlDocument(); XmlElement value = document.CreateElement("EncryptionMethod"); method.LoadXml(value); Assert.Same(method.GetXml(), method.GetXml()); }
public void LoadXml(string xml, string expectedKeyAlgorithm, int expectedKeySize) { XmlDocument document = new XmlDocument(); document.LoadXml(xml); XmlElement value = (XmlElement)document.FirstChild; EncryptionMethod method = new EncryptionMethod(); method.LoadXml(value); Assert.Equal(expectedKeyAlgorithm, method.KeyAlgorithm); Assert.Equal(expectedKeySize, method.KeySize); Assert.Same(value, method.GetXml()); }
public void GetXml_FromConstructor_DoesntCacheXml() { EncryptionMethod method = new EncryptionMethod(); Assert.NotSame(method.GetXml(), method.GetXml()); }
public void GetXml(EncryptionMethod method, string xml) { XmlElement element = method.GetXml(); Assert.Equal(xml, element.OuterXml); }