public void AddChecked() { foreach (InputType e in Enum.GetValues(typeof(InputType))) { _tag = new Input(e); switch (e) { case InputType.Checkbox: _tag.AddChecked(); Assert.AreEqual(_tag.ToString(), "<input checked=\"checked\" type=\"checkbox\">"); break; case InputType.Radio: _tag.AddChecked(); Assert.AreEqual(_tag.ToString(), "<input checked=\"checked\" type=\"radio\">"); break; default: Assert.Throws <InvalidAttribute>(_tag.AddChecked); break; } } }