public void FormObjectTransformToHtmlIsString()
        {
            FormObject formObject = new FormObject()
            {
                FormId            = "1",
                MultipleIteration = false
            };
            string expected = "<h1>ScriptLinkStandard.Objects.FormObject</h1><table><thead><tr><th>Property</th><th>Value</th></tr></thead><tbody></tbody></table><h2>CurrentRow</h2><h2>OtherRows</h2>";

            Assert.AreEqual(expected, formObject.ToHtmlString());
            Assert.AreEqual(expected.GetType(), formObject.ToHtmlString().GetType());
        }
        public void FormObject_CanGetHtmlString_WithHtmlHeaders()
        {
            FormObject formObject = new FormObject();
            var        actual     = formObject.ToHtmlString(false);

            Assert.IsNotNull(actual);
        }
        public void TransformToHtmlString_FormObject_IsString()
        {
            FormObject formObject = new FormObject()
            {
                FormId            = "1",
                MultipleIteration = false
            };
            StringBuilder sb = new StringBuilder();

            sb.Append("<h1>RarelySimple.AvatarScriptLink.Objects.FormObject</h1>");
            sb.Append("<table><thead>");
            sb.Append("<tr><th>Property</th><th>Value</th></tr>");
            sb.Append("</thead><tbody>");
            sb.Append("<tr><td>FormId</td><td>1</td></tr>");
            sb.Append("<tr><td>MultipleIteration</td><td>False</td></tr>");
            sb.Append("<tr><td>OtherRows</td><td>System.Collections.Generic.List`1[RarelySimple.AvatarScriptLink.Objects.RowObject]</td></tr>");
            sb.Append("</tbody></table>");
            sb.Append("<h2>CurrentRow</h2>");
            sb.Append("<h2>OtherRows</h2>");
            string expected = sb.ToString();

            string actual = formObject.ToHtmlString();

            Assert.AreEqual(expected, actual);
            Assert.AreEqual(expected.GetType(), actual.GetType());
        }
        public void FormObjectTransformToHtmlOverrideDoesHaveHeaders()
        {
            FormObject formObject = new FormObject()
            {
                FormId            = "1",
                MultipleIteration = false
            };

            Assert.IsTrue(formObject.ToHtmlString(true).Contains("<html>"));
        }
        public void FormObjectTransformToHtmlDoesNotHaveHeaders()
        {
            FormObject formObject = new FormObject()
            {
                FormId            = "1",
                MultipleIteration = false
            };

            Assert.IsFalse(formObject.ToHtmlString().Contains("<html>"));
        }
        public void TransformToHtmlString_FormObject_OverrideDoesHaveHeaders()
        {
            FormObject formObject = new FormObject()
            {
                FormId            = "1",
                MultipleIteration = false
            };

            string actual = formObject.ToHtmlString(true);

            Assert.IsTrue(actual.Contains("<html>"));
        }