public void OptionObjectTransformToHtmlIsString() { OptionObject optionObject = new OptionObject() { EntityID = "1", SystemCode = "UAT" }; string expected = "<h1>ScriptLinkStandard.Objects.OptionObject</h1><h2>Forms</h2>"; Assert.AreEqual(expected, optionObject.ToHtmlString()); Assert.AreEqual(expected.GetType(), optionObject.ToHtmlString().GetType()); }
public void OptionObject_CanGetHtmlString_WithoutHtmlHeaders() { OptionObject optionObject = new OptionObject(); var actual = optionObject.ToHtmlString(false); Assert.IsNotNull(actual); }
public void TransformToHtmlString_OptionObject_AreEqual() { OptionObject optionObject = new OptionObject() { EntityID = "1", SystemCode = "UAT" }; StringBuilder sb = new StringBuilder(); sb.Append("<h1>RarelySimple.AvatarScriptLink.Objects.OptionObject</h1>"); sb.Append("<table><thead>"); sb.Append("<tr><th>Property</th><th>Value</th></tr>"); sb.Append("</thead><tbody>"); sb.Append("<tr><td>EntityID</td><td>1</td></tr>"); sb.Append("<tr><td>EpisodeNumber</td><td>0</td></tr>"); sb.Append("<tr><td>ErrorCode</td><td>0</td></tr>"); sb.Append("<tr><td>Forms</td><td>System.Collections.Generic.List`1[RarelySimple.AvatarScriptLink.Objects.FormObject]</td></tr>"); sb.Append("<tr><td>SystemCode</td><td>UAT</td></tr>"); sb.Append("</tbody></table>"); sb.Append("<h2>Forms</h2>"); string expected = sb.ToString(); string actual = optionObject.ToHtmlString(); Assert.AreEqual(expected, actual); }
public void OptionObjectTransformToHtmlOverrideDoesHaveHeaders() { OptionObject optionObject = new OptionObject() { EntityID = "1", SystemCode = "UAT" }; Assert.IsTrue(optionObject.ToHtmlString(true).Contains("<html>")); }
public void OptionObjectTransformToHtmlDoesNotHaveHeaders() { OptionObject optionObject = new OptionObject() { EntityID = "1", SystemCode = "UAT" }; Assert.IsFalse(optionObject.ToHtmlString().Contains("<html>")); }
public void TransformToHtmlString_OptionObject_OverrideDoesHaveHeaders() { OptionObject optionObject = new OptionObject() { EntityID = "1", SystemCode = "UAT" }; string actual = optionObject.ToHtmlString(true); Assert.IsTrue(actual.Contains("<html>")); }
public void TransformToHtmlString_OptionObject_IsString() { OptionObject optionObject = new OptionObject() { EntityID = "1", SystemCode = "UAT" }; string expected = "<h1>RarelySimple.AvatarScriptLink.Objects.OptionObject</h1><h2>Forms</h2>"; var actual = optionObject.ToHtmlString(); Assert.AreEqual(expected.GetType(), actual.GetType()); }