public void ReadWriteProperty_Context() { vCardSource source = new vCardSource(); source.Context = "LDAP"; Assert.AreEqual( "LDAP", source.Context, "The Context property is not working."); }
public void ReadWriteProperty_Uri() { Uri testUri = new Uri("isdn:123456789"); vCardSource source = new vCardSource(); source.Uri = testUri; Assert.AreEqual( testUri, source.Uri); }
public void Constructor() { // Tests the default values of the vCardSource // class when the parameterless constructor is used. vCardSource source = new vCardSource(); Assert.IsEmpty( source.Context, "The Context property should default to empty."); Assert.IsNull( source.Uri, "The Uri property should default to null."); }
public static void Equals(vCardSource s1, vCardSource s2) { Assert.AreEqual( s1.Context, s2.Context, "vCardSource.Context differs."); Assert.AreEqual( s1.ToString(), s2.ToString(), "vCardSource.ToString differs."); Assert.AreEqual( s1.Uri, s2.Uri, "vCardSource.Uri differs."); }
/// <summary> /// Reads the SOURCE property. /// </summary> private void ReadInto_SOURCE(vCard card, vCardProperty property) { // The SOURCE property identifies the source of // directory information (e.g. an LDAP server). This // is not widely supported. See RFC 2425, sec. 6.1. vCardSource source = new vCardSource(); source.Context = property.Subproperties.GetValue("CONTEXT"); source.Uri = new Uri(property.Value.ToString()); card.Sources.Add(source); }