public void ConvertLiftStringToSimpleStringWithMarkers_TextWithNoSpan() { LiftString liftStringToConvert = new LiftString("No Markers Here!"); string convertedString = MultiText.ConvertLiftStringToSimpleStringWithMarkers(liftStringToConvert); Assert.AreEqual("No Markers Here!", convertedString); }
public void ConvertLiftStringToSimpleStringWithMarkers_TextWithOneSpan() { LiftString liftStringToConvert = new LiftString("Text to Mark Up!"); LiftSpan span1 = new LiftSpan(0, 4, "", "", ""); liftStringToConvert.Spans.Add(span1); string convertedString = MultiText.ConvertLiftStringToSimpleStringWithMarkers(liftStringToConvert); Assert.AreEqual("<span>Text</span> to Mark Up!", convertedString); }
public void ConvertLiftStringToSimpleStringWithMarkers_SpanWithClass_ReturnsMarkerWithClass() { LiftString liftStringToConvert = new LiftString("Text to Mark Up!"); LiftSpan span1 = new LiftSpan(0, 4, "", "ClassType", ""); liftStringToConvert.Spans.Add(span1); string convertedString = MultiText.ConvertLiftStringToSimpleStringWithMarkers(liftStringToConvert); Assert.AreEqual("<span class=\"ClassType\">Text</span> to Mark Up!", convertedString); }
public void ConvertLiftStringToSimpleStringWithMarkers_SpanWithHref_ReturnsMarkerWithHref() { LiftString liftStringToConvert = new LiftString("Text to Mark Up!"); LiftSpan span1 = new LiftSpan(0, 4, "", "", "reference"); liftStringToConvert.Spans.Add(span1); string convertedString = MultiText.ConvertLiftStringToSimpleStringWithMarkers(liftStringToConvert); Assert.AreEqual("<span href=\"reference\">Text</span> to Mark Up!", convertedString); }
public void ConvertLiftStringToSimpleStringWithMarkers_TextWithOneSpanEndingWhereASecondStarts_CloseTagOfFirstAppearsBeforeStartingTagOfSecond() { LiftString liftStringToConvert = new LiftString("Text to Mark Up!"); LiftSpan span1 = new LiftSpan(0, 4, "", "", ""); LiftSpan span2 = new LiftSpan(4, 3, "", "", ""); liftStringToConvert.Spans.Add(span1); liftStringToConvert.Spans.Add(span2); string convertedString = MultiText.ConvertLiftStringToSimpleStringWithMarkers(liftStringToConvert); Assert.AreEqual("<span>Text</span><span> to</span> Mark Up!", convertedString); }