public void NoCounselWithoutElders() { var council = new Council(); var response = council.GiveCounsel("Marriage"); var expected = new string[0]; Assert.IsTrue(expected.SequenceEqual(response)); }
public void HearEveryVoice() { var council = new Council(); council.IncreaseWisdom(new OscarWilde().GiveCounsel); council.IncreaseWisdom(new RedSkelton().GiveCounsel); 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)); }
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)); }
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)); }