public void FormGeneratorProperty() { // Arrange Mock<ViewContext> mockViewContext = new Mock<ViewContext>(); mockViewContext.Expect(c => c.HttpContext.Items).Returns(new Hashtable()); HtmlHelper htmlHelper = new HtmlHelper(mockViewContext.Object, new Mock<IViewDataContainer>().Object); // Act string form0Name = htmlHelper.FormIdGenerator(); string form1Name = htmlHelper.FormIdGenerator(); string form2Name = htmlHelper.FormIdGenerator(); // Assert Assert.AreEqual("form0", form0Name); Assert.AreEqual("form1", form1Name); Assert.AreEqual("form2", form2Name); }