public void CanSetPersonBaseNameBasedOnCombinedName_LastNameOnly()
        {
            var person = new PersonBase();
            var setValue = "LASTNAME";

            person.SetCombinedName(setValue);

            Assert.IsTrue(!string.IsNullOrEmpty(person.LastName));
        }
        public void CanGetCombinedNameBySettingPersonBaseNamesBasedOnCombinedName_BothNames()
        {
            var person = new PersonBase();
            var setValue = "LASTNAME, FIRSTNAME";

            person.SetCombinedName(setValue);

            Assert.IsTrue(!string.IsNullOrEmpty(person.LastName));
            Assert.IsTrue(!string.IsNullOrEmpty(person.FirstName));

            Assert.AreEqual(setValue, person.CombinedName);
        }
        public void CanGetCombinedNameBySettingPersonBaseNamesBasedOnCombinedName_ThreeNames()
        {
            var person = new PersonBase();
            var firstName = "Firstname";
            var middleName = "Middlename";
            var lastName = "Lastname";
            var setValue = string.Format(@"{0}, {1} {2}", lastName, firstName, middleName);

            person.SetCombinedName(setValue);

            Assert.IsTrue(!string.IsNullOrEmpty(person.LastName));
            Assert.IsTrue(!string.IsNullOrEmpty(person.FirstName));
            Assert.IsTrue(!string.IsNullOrEmpty(person.OtherNames));
        }
        public void DoesLastNameGetUpperCasedWhenSettingCombinedName_LastNameOnly()
        {
            var person = new PersonBase();
            var setValue = "Lastname";
            person.SetCombinedName(setValue);

            Assert.IsTrue(!string.IsNullOrEmpty(person.LastName));
            Assert.IsTrue(person.LastName.CompareTo(setValue.ToUpper()) == 0);
        }