示例#1
0
        public void width_is_the_text_width()
        {
            var text = "a bunch of text";
            var line = new PlainLine(text);

            line.Width.ShouldEqual(text.Length);
        }
示例#2
0
        public void write()
        {
            var text = "a bunch of text";
            var line = new PlainLine(text);

            var writer = MockRepository.GenerateMock<TextWriter>();

            line.Write(writer);

            writer.AssertWasCalled(x => x.WriteLine(text));
        }
示例#3
0
        public void AddText(string text)
        {
            var line = new PlainLine(text);

            _lines.Add(line);
        }
示例#4
0
 public void AddText(string text)
 {
     var line = new PlainLine(text);
     _lines.Add(line);
 }