I got my first HTML helper to work, very exciting.
It is working and inserting HTML into a VIEW, so I have managed to learn that much. However, the HTML is not perfect.
I would like to create unit tests to verify the output of the helper.
I have created a new test project , the code for the single test follows
<TestClass()> Public Class testBoundField
<TestMethod()> Public Sub FormRowHelper_test()
Dim html1 As String = Html.FormRowHelper("controlId")
Assert.AreEqual("perfect html", html1)
'FormRowHelper' is not a member of Html
I think what that is doing inside your test is trying to map to an HTML namespace, not the helper. In your test, you have to construct the HtmlHelper class:
Dim helper As New HtmlHelper([params]) helper.FormRowHelper("controlId")
I don't know what it takes to construct the helper class; you may have to mock the instances of the classes it wants (with TypeMock or Moq or something else).