예제 #1
0
        public void GenerateMaleName_Correct()
        {
            Gender gender = Gender.Male;

            var builder = _nameGenerator.GenerateName();

            Assert.IsNotNull(builder);

            string name = _nameGenerator.AdjustToGender(builder, gender);

            Assert.IsNotNull(name);
            Assert.IsTrue(name.Length >= 2);
            Assert.IsTrue(name.Length <= 10);
            Assert.AreNotEqual('a', name.Last());
        }
예제 #2
0
        public void NameSetter(Person person)
        {
            var builder = _nameGenerator.GenerateName();

            person.Name = _nameGenerator.AdjustToGender(builder, person.PersonGender);
        }