public void Test_GenericElement_And_Element_Clear() { GenericElement<Element> t = new GenericElement<Element>("Test"); t.Id("myId"); t.Attributes(new { data_test = true, data_test2 = "true" }); // Render again to register options above t.Render(); t.Clear(); Assert.AreEqual("<Test></Test>", t.Render(), "Options not removed"); }
public void Test_GenericElement_Render_With_Id_And_Css() { GenericElement<Element> t = new GenericElement<Element>("Test"); t.Id("myId"); t.AddCss("myClass"); Assert.AreEqual("<Test class=\"myClass\" id=\"myId\"></Test>", t.Render(), "Class is not the same"); }
public void Test_GenericElement_With_Id_Render() { GenericElement<Element> t = new GenericElement<Element>("Test"); t.Id("myId"); Assert.AreEqual("<Test id=\"myId\"></Test>", t.Render(), "Id is not the same"); }
public void Test_GenericElement_Render_With_HtmlAttributes() { GenericElement<Element> t = new GenericElement<Element>("Test"); t.Attributes(new { data_test = true, data_test2 = "true" }); Assert.AreEqual("<Test data-test=\"True\" data-test2=\"true\"></Test>", t.Render(), "Attributes is not the same"); }