Exemple #1
0
        public void Valid3_all_empty()
        {
            var rec = new ValidFixedRecord();

            var result = rec.ToFixedRecord();

            result.ShouldBe("          ");
        }
Exemple #2
0
        public void Value_overflow_throws_exception()
        {
            var rec = new ValidFixedRecord();

            rec.Column1 = "hello world";

            var ex = Should.Throw<ArgumentException>(() => rec.ToFixedRecord());
            ex.Message.ShouldContain("is longer");
        }
Exemple #3
0
        public void Valid2_Empty_property_replaced_with_whitespace()
        {
            var rec = new ValidFixedRecord();
            rec.Column1 = "a";
            rec.Column3 = "c";
            rec.Column4 = "d";
            var result = rec.ToFixedRecord();

            result.ShouldBe("a     c  d");
        }
Exemple #4
0
        public void Valid1_all_properties()
        {
            var rec = new ValidFixedRecord();
            rec.Column1 = "a";
            rec.Column2 = "b";
            rec.Column3 = "c";

            var result = rec.ToFixedRecord();

            result.ShouldBe("a  b  c   ");
        }