public static void FromXonXcnMissingPersonAlternateFormat() { Institution i = new Institution("Abc", "123"); string xonxcn = String.Format("{0}", i.ToXON()); Recipient r = Recipient.FromXONXCNXTN(xonxcn); Assert.Null(r.Person); Assert.Equal(i, r.Institution); }
public static void FromXonXcnWorksForSimpleCase() { Person p = new Person { First = "Bob", Last = "Smith", Degree = "MD" }; Institution i = new Institution("Abc", "123"); string xonxcn = String.Format("{0}|{1}", i.ToXON(), p.ToXCN()); Recipient r = Recipient.FromXONXCNXTN(xonxcn); Assert.Equal(p, r.Person); Assert.Equal(i, r.Institution); }