public void Shoud_not_detect_gender_if_auto_detection_is_not_set(string middleName)
        {
            var petrovich = new Petrovich { AutoDetectGender = false, MiddleName = middleName };
            petrovich.InflectMiddleNameTo(Case.Accusative);

            Assert.AreEqual(Gender.Androgynous, petrovich.Gender);
        }
        public void Shoud_detect_gender_if_auto_detection_is_set(string middleName, Gender expected)
        {
            var petrovich = new Petrovich {AutoDetectGender = true, MiddleName = middleName};
            petrovich.InflectMiddleNameTo(Case.Accusative);

            Assert.AreEqual(expected, petrovich.Gender);
        }
Beispiel #3
0
        public void Shoud_not_detect_gender_if_auto_detection_is_not_set(string middleName)
        {
            var petrovich = new Petrovich {
                AutoDetectGender = false, MiddleName = middleName
            };

            petrovich.InflectMiddleNameTo(Case.Accusative);

            Assert.AreEqual(Gender.Androgynous, petrovich.Gender);
        }
Beispiel #4
0
        public void Shoud_detect_gender_if_auto_detection_is_set(string middleName, Gender expected)
        {
            var petrovich = new Petrovich {
                AutoDetectGender = true, MiddleName = middleName
            };

            petrovich.InflectMiddleNameTo(Case.Accusative);

            Assert.AreEqual(expected, petrovich.Gender);
        }
 public string InflectMiddleNameTo(Case @case)
 {
     Reset();
     return _petrovich.InflectMiddleNameTo(@case);
 }
Beispiel #6
0
        public void Should_throw_ArgumentNullException_if_middle_name_is_not_provided()
        {
            var petrovich = new Petrovich();

            Assert.Throws <ArgumentNullException>(() => petrovich.InflectMiddleNameTo(Case.Accusative));
        }
        public void Should_throw_ArgumentNullException_if_middle_name_is_not_provided()
        {
            var petrovich = new Petrovich();

            Assert.Throws<ArgumentNullException>(() => petrovich.InflectMiddleNameTo(Case.Accusative));
        }