コード例 #1
0
 public void TestJoin()
 {
     var joiner = new SentenceJoiner();
     joiner.Add("a");
     joiner.Add("b");
     joiner.Add("c");
     Assert.AreEqual("a b c", joiner.Join());
 }
 public string ProcessKeyMessage(KeyMessageData data)
 {
     this.data = data;
     var message = new SentenceJoiner();
     message.Add(GetSentence1());
     message.Add(GetSentence2());
     message.Add(GetSentence3());
     return message.Join();
 }
コード例 #3
0
 public void TestAddIgnoresNull()
 {
     var joiner = new SentenceJoiner();
     joiner.Add(null);
     Assert.AreEqual(string.Empty, joiner.Join());
 }
 public string ProcessKeyMessage(KeyMessageData data)
 {
     this.data = data;
     var message = new SentenceJoiner();
     message.Add(GetSentence2());
     message.Add(GetSentence3());
     message.Add(GetSentence4());
     message.Add(GetSentence5(Significance.Worse));
     message.Add(GetSentence5(Significance.Better));
     message.Add(GetSentence6(Significance.Worse));
     message.Add(GetSentence6(Significance.Better));
     message.Add(GetSentence7(Significance.Worse));
     message.Add(GetSentence7(Significance.Better));
     return message.Join();
 }