public void ToString_BlockIsVisible_ReturnEmptyString() { // Arrange var totalContentsHtml = new StringBuilder(); var block = new SystemParlayDetail_TotalContents_Block(); block.Visible = false; // Act block.ToString(ref totalContentsHtml); // Assert Assert.IsNullOrEmpty(totalContentsHtml.ToString()); }
public void ToString_WhenCalled_ReturnHtmlString() { // Arrange var totalWinloss = "20000"; var totalContentsHtml = new StringBuilder(); var block = new SystemParlayDetail_TotalContents_Block(); block.TotalWinloss = totalWinloss; // Act block.ToString(ref totalContentsHtml); // Assert var expectedHtml = string.Format(TotalContentsTemplate, totalWinloss); Assert.AreEqual(expectedHtml, totalContentsHtml.ToString()); }