public void MicroDvdReadBoldBothLinesItalicFirst() { var target = new MicroDvd(); var subtitle = new Subtitle(); var list = new List<string> { "{0}{0}{Y:b}{y:i}Hello!|Hello!" }; target.LoadSubtitle(subtitle, list, null); string text = subtitle.Paragraphs[0].Text; Assert.IsTrue(text == "<b><i>Hello!</i>" + Environment.NewLine + "Hello!</b>" || text == "<b><i>Hello!</i></b>" + Environment.NewLine + "<b>Hello!</b>"); }
public void MicroDvdReadBoldSecondLineOnly() { var target = new MicroDvd(); var subtitle = new Subtitle(); var list = new List<string> { "{0}{0}Hello!|{y:i}Hello!" }; target.LoadSubtitle(subtitle, list, null); string text = subtitle.Paragraphs[0].Text; Assert.IsTrue(text == "Hello!" + Environment.NewLine + "<i>Hello!</i>"); }
public void MicroDvdReadFont() { var target = new MicroDvd(); var subtitle = new Subtitle(); var list = new List<string> { "{0}{0}{C:$FF0000}Blue" }; target.LoadSubtitle(subtitle, list, null); string text = subtitle.Paragraphs[0].Text; Assert.IsTrue(text == "<font color=\"#0000FF\">Blue</font>" || text == "<font color=\"blue\">Blue</font>"); }
public void MicroDvdReadAdvanced() { var target = new MicroDvd(); var subtitle = new Subtitle(); var list = new List<string> { "{0}{25}{c:$0000ff}{y:b,u}{f:DeJaVuSans}{s:12}Hello!" }; target.LoadSubtitle(subtitle, list, null); string text = subtitle.Paragraphs[0].Text; Assert.IsTrue(text == "<font color=\"#ff0000\"><b><u><font face=\"DeJaVuSans\"><font size=\"12\">Hello!</font></font></u></b></font>"); }
public void MicroDvdReadBoldItalic() { var target = new MicroDvd(); var subtitle = new Subtitle(); var list = new List<string> { "{0}{0}{y:i,b}Hello!" }; target.LoadSubtitle(subtitle, list, null); string text = subtitle.Paragraphs[0].Text; Assert.IsTrue(text == "<i><b>Hello!</b></i>"); }