public void ToString_BlockIsVisible_ReturnEmptyString() { // Arrange var leagueNameHtml = new StringBuilder(); var block = new Choice_League_LeagueName_Block(); block.Visible = false; // Act block.ToString(ref leagueNameHtml); // Assert Assert.IsNullOrEmpty(leagueNameHtml.ToString()); }
public void ToString_WhenCalled_ReturnHtmlString() { // Arrange var leagueName = "WTA - Australian Open (First Set - Game Winner)"; var leagueNameHtml = new StringBuilder(); var block = new Choice_League_LeagueName_Block(); block.leagueName = leagueName; // Act block.ToString(ref leagueNameHtml); // Assert var expectedHtml = string.Format(LeagueNameTemplate, leagueName); Assert.AreEqual(expectedHtml, leagueNameHtml.ToString()); }