Exemplo n.º 1
0
        public void width()
        {
            var set = new ColumnSet(3);
            var line = set.Add("aaaaa", "bbb", "cc");

            // the default padding between columns is 5 spaces
            line.Width.ShouldEqual(20);
        }
Exemplo n.º 2
0
 public void adding_a_line_with_the_wrong_counts_throws_exception()
 {
     Exception<ArgumentOutOfRangeException>.ShouldBeThrownBy(() =>
     {
         var set = new ColumnSet(3);
         set.Add("a", "b");
     });
 }
Exemplo n.º 3
0
        public void write_a_line()
        {
            var set = new ColumnSet(3);
            var line = set.Add("a", "b", "c");

            var writer = new StringWriter();

            line.Write(writer);

            var text = "a*****b*****c\r\n".Replace("*", " ");

            writer.ToString().ShouldEqualWithLineEndings(text);
        }