コード例 #1
0
        public void CheckNumber_with_Date_is_not_ok(string dateString, int number)
        {
            // arrange
            var language = new GermanLanguage();
            DateTime date;
            DateTime.TryParse(dateString, out date);
            var fears = new Katas.FearOfNumbers.FearOfNumbers(date);
            fears.AddPatient(GetKarl());

            // act
            var actual = fears.CheckNumber(s_Karl, number);

            // assert
            Assert.Equal(language.GetText(TextKey.IsNotOk), actual);
        }
コード例 #2
0
        private void CheckNumber(IPatient patient, ILanguage language, string displayName, string dayOfWeek, int number, TextKey key)
        {
            // arrange
            var fears = new Katas.FearOfNumbers.FearOfNumbers(displayName);
            fears.AddPatient(patient);

            // act
            var actual = fears.CheckNumber(patient.Name, dayOfWeek, number);

            // assert
            Assert.Equal(language.GetText(key), actual);
        }