public void ProcessClosesItalicsTagIfFontFormatIsCurrentlyItalics() { //Arrange var boldCommand = new Bold(); var currentPdf = new CurrentPdf(); currentPdf.StringBuilder = new StringBuilder(); currentPdf.CurrentFontFormat = FontFormat.Italics; var expectedValue = "</i><b>"; //Act boldCommand.Process(ref currentPdf); //Assert Assert.AreEqual(expectedValue, currentPdf.StringBuilder.ToString()); Assert.AreEqual(FontFormat.Bold, currentPdf.CurrentFontFormat); }
public void ProcessAppendsBoldTagToStringBuilder(FontFormat currentFontFormat) { //Arrange var boldCommand = new Bold(); var currentPdf = new CurrentPdf(); currentPdf.StringBuilder = new StringBuilder(); currentPdf.CurrentFontFormat = currentFontFormat; var expectedValue = "<b>"; //Act boldCommand.Process(ref currentPdf); //Assert Assert.AreEqual(expectedValue, currentPdf.StringBuilder.ToString()); Assert.AreEqual(FontFormat.Bold, currentPdf.CurrentFontFormat); }