Esempio n. 1
0
        public void RendersCheckbox()
        {
            var doc      = new FormDocument <CheckboxTests>();
            var contents = doc.ToPlainText();

            Assert.AreEqual("$CB,\"This is my checkbox\",PROP=\"MyCheckbox\"$\n", contents);
        }
Esempio n. 2
0
        public void RendersButton()
        {
            var doc      = new FormDocument <FormButtonTests>();
            var contents = doc.ToPlainText();

            Assert.AreEqual("\n $BT,\"Press me!\",H=\"HandleButton\"$\n", contents);
        }
Esempio n. 3
0
        public void RendersListField()
        {
            var doc      = new FormDocument <EnumListFieldTests>();
            var contents = doc.ToPlainText();

            Assert.AreEqual($"$LS,A=\"My List Field\",TYPE=\"Enum\",SRC=\"{typeof(Values).AssemblyQualifiedName}\",PROP=\"MyEnumValue\"$\n", contents);
        }
Esempio n. 4
0
        public void RendersHeaderAndFooter()
        {
            var doc      = new FormDocument <FormHeaderFooterTests>();
            var contents = doc.ToPlainText();

            Assert.IsTrue(contents.StartsWith("HEADER"));
            Assert.IsTrue(contents.EndsWith("FOOTER"));
        }