public void ToString_BlockIsVisible_ReturnEmptyString() { // Arrange var transTimeHtml = new StringBuilder(); var block = new Trans_TransTime_Block(); block.Visible = false; // Act block.ToString(ref transTimeHtml); // Assert Assert.IsNullOrEmpty(transTimeHtml.ToString()); }
public void ToString_WhenCalled_ReturnHtmlString() { // Arrange var refNo = "1000000"; var transTimeHtml = new StringBuilder(); var block = new Trans_TransTime_Block(); block.refNo = refNo; // Act block.ToString(ref transTimeHtml); // Assert var expectedHtml = string.Format(TransTimeTemplate, refNo); Assert.AreEqual(expectedHtml, transTimeHtml.ToString()); }