public void Names_FirstLast()
 {
     var donor = new Donor(1, "Mustermann, Markus", string.Empty, string.Empty, string.Empty, string.Empty,
             null, string.Empty, 0, 0);
     Assert.AreEqual("Mustermann", donor.LastName);
     Assert.AreEqual("Markus", donor.FirstName);
     Assert.AreEqual("P", donor.PersonType);
 }
 public void Phones()
 {
     var donor = new Donor(1, "Mustermann, Markus", string.Empty, string.Empty, string.Empty, string.Empty,
         new[] { "p: 01234 d: 09876", "0135975"}, string.Empty, 0, 0);
     Assert.AreEqual("Mustermann", donor.LastName);
     Assert.AreEqual("Markus", donor.FirstName);
     Assert.AreEqual("P", donor.PersonType);
     Assert.AreEqual("01234, 09876, 0135975", donor.CombinedPhoneNo);
 }
 public void Names_Organization()
 {
     var donor = new Donor(1, "Organization", "Bla", string.Empty, string.Empty, string.Empty,
             null, string.Empty, 0, 0);
     Assert.AreEqual("Organization", donor.LastName);
     Assert.AreEqual(string.Empty, donor.FirstName);
     Assert.AreEqual("Bla", donor.ContactPerson);
     Assert.AreEqual("O", donor.PersonType);
 }
 public void Spouse()
 {
     var donor = new Donor(1, "Mustermann, Markus und Martina", string.Empty, string.Empty, string.Empty, string.Empty,
             null, string.Empty, 0, 0);
     Assert.AreEqual("Mustermann", donor.LastName);
     Assert.AreEqual("Markus", donor.FirstName);
     Assert.AreEqual("", donor.SpouseLastName);
     Assert.AreEqual("Martina", donor.SpouseFirstName);
     Assert.AreEqual("P", donor.PersonType);
     Assert.AreEqual("", donor.Title);
 }
 public void SpouseAndTitle()
 {
     var donor = new Donor(1, "Mustermann, Prof. Dr. Dr. h.c. Markus & Pfarrerin Martina", string.Empty, string.Empty, string.Empty, string.Empty,
             null, string.Empty, 0, 0);
     Assert.AreEqual("Mustermann", donor.LastName);
     Assert.AreEqual("Markus", donor.FirstName);
     Assert.AreEqual("Prof. Dr. Dr. h.c.", donor.Title);
     Assert.AreEqual("", donor.SpouseLastName);
     Assert.AreEqual("Martina", donor.SpouseFirstName);
     Assert.AreEqual("P", donor.PersonType);
     Assert.AreEqual("Pfarrerin", donor.SpouseTitle);
 }
 private static void AssertDonorEqual(Donor expected, Donor actual)
 {
     Assert.AreEqual(expected.DonorNo, actual.DonorNo, "Wrong donor number");
     Assert.AreEqual(expected.Name, actual.Name, "Wrong donor name");
     Assert.AreEqual(expected.Street, actual.Street, "Wrong donor street");
     Assert.AreEqual(expected.Plz, actual.Plz, "Wrong zip code");
     Assert.AreEqual(expected.City, actual.City, "Wrong donor city");
     CollectionAssert.AreEqual(expected.PhoneNos, actual.PhoneNos, "Wrong phone numbers");
     Assert.AreEqual(expected.Email, actual.Email, "Wrong email");
     Assert.AreEqual(expected.DonationsCount, actual.DonationsCount, "Wrong number of donations");
     Assert.AreEqual(expected.Amount, actual.Amount, "Wrong donation amount");
 }