Esempio n. 1
0
 public void Trim_from_the_end()
 {
     using(TextReader reader = new TrimmingStringReader("this is plain text   ")) {
         string result = reader.ReadToEnd();
         Assert.AreEqual("this is plain text", result);
     }
 }
 public void Trim_both_the_beginning_and_end()
 {
     TextReader reader = new TrimmingStringReader("   this is plain text   ");
     string result = reader.ReadToEnd();
     Assert.AreEqual("this is plain text", result);
 }
 public void Nothing_to_trim()
 {
     TextReader reader = new TrimmingStringReader("this is plain text");
     string result = reader.ReadToEnd();
     Assert.AreEqual("this is plain text", result);
 }