Example #1
0
        public void Write_if_true_test(bool isTrue, string expected)
        {
            FluentTextTemplate ft     = new FluentTextTemplate();
            string             result = ft.Write("public")
                                        .WriteIf(isTrue, " abstract");

            Assert.That(result, Is.EqualTo(expected));
        }
Example #2
0
        public void Template_with_header_Test()
        {
            FluentTextTemplate ft = new FluentTextTemplate {
                Header = "this is header"
            };
            string result   = ft.Write("hellow world");
            var    expected = $"this is header{_nl}hellow world";

            Assert.That(result, Is.EqualTo(expected));
        }