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 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 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 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>");
 }
 public void MicroDvdItalicUnderline()
 {
     var target = new MicroDvd();
     var subtitle = new Subtitle();
     subtitle.Paragraphs.Add(new Paragraph("<i><u>Underline Italic</u></i>", 0, 0));
     string text = target.ToText(subtitle, "title");
     Assert.IsTrue(text == "{0}{0}{Y:i}{Y:u}Underline Italic" || text == "{0}{0}{y:i}{y:u}Underline Italic");
 }
 public void MicroDvdBold()
 {
     var target = new MicroDvd();
     var subtitle = new Subtitle();
     subtitle.Paragraphs.Add(new Paragraph("<b>Bold</b>", 0, 0));
     string text = target.ToText(subtitle, "title");
     Assert.IsTrue(text == "{0}{0}{Y:b}Bold" || text == "{0}{0}{y:b}Bold");
 }
Exemplo n.º 8
0
 public void MicroDvdReadItalicBothLines()
 {
     var target = new MicroDvd();
     var subtitle = new Subtitle();
     List<string> list = new List<string>();
     list.Add("{0}{0}{Y:i}Hello!|Hello!");
     target.LoadSubtitle(subtitle, list, null);
     string text = subtitle.Paragraphs[0].Text;
     Assert.IsTrue(text == "<i>Hello!" + Environment.NewLine + "Hello!</i>" ||
                   text == "<i>Hello!</i>" + Environment.NewLine + "<i>Hello!</i>");
 }