Example #1
0
        public void RespectCollectiveWisdom()
        {
            var council = new Council();
            Func<string, string> jin = new OscarWilde().GiveCounsel;
            Func<string, string> jang = new RedSkelton().GiveCounsel;
            var whole = jin + jang;
            council.IncreaseWisdom(whole);

            var response = council.GiveCounsel("Marriage");

            var expected = new string[] {
                "One should always be in love. That is the reason one should never marry.",
                "All men make mistakes, but married men find out about them sooner."
            };

            Assert.IsTrue(expected.SequenceEqual(response));
        }
Example #2
0
        public void MuteExceptionalElders()
        {
            var council = new Council();
            Func<string, string> a = new OscarWilde().GiveCounsel;
            Func<string, string> b = new Socrates().GiveCounsel;
            Func<string, string> c = new RedSkelton().GiveCounsel;
            council.IncreaseWisdom(a + b + c);

            var response = council.GiveCounsel("Marriage");

            var expected = new string[] {
                "One should always be in love. That is the reason one should never marry.",
                "All men make mistakes, but married men find out about them sooner."
            };

            Assert.IsTrue(expected.SequenceEqual(response));
        }