public void GeneratePreview(RemoveTextForHISettings settings)
        {
            if (_subtitle == null)
            {
                return;
            }

            _removeTextForHiLib          = new RemoveTextForHI(settings);
            _removeTextForHiLib.Warnings = new List <int>();
            int count = 0;

            _fixes = new Dictionary <Paragraph, string>();
            var previewItems = new List <PreviewItem>();

            for (int index = 0; index < _subtitle.Paragraphs.Count; index++)
            {
                Paragraph p = _subtitle.Paragraphs[index];
                _removeTextForHiLib.WarningIndex = index - 1;
                string newText = _removeTextForHiLib.RemoveTextFromHearImpaired(p.Text);
                if (p.Text.Replace(" ", string.Empty) != newText.Replace(" ", string.Empty))
                {
                    count++;
                    previewItems.Add(new PreviewItem(p.ID, true, p.Number.ToString(CultureInfo.InvariantCulture), p.Text, newText));
                    _fixes.Add(p, newText);
                }
            }
            Window.ShowFixes(previewItems);
            //groupBoxLinesFound.Text = string.Format(_language.LinesFoundX, count);
        }
Beispiel #2
0
        public FormRemoveTextForHearImpaired(Main main, Subtitle subtitle)
        {
            UiUtil.PreInitialize(this);
            InitializeComponent();
            UiUtil.FixFonts(this);

            _mainForm           = main;
            _removeTextForHiLib = new RemoveTextForHI(GetSettings(subtitle));

            checkBoxRemoveTextBetweenSquares.Checked           = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenBrackets;
            checkBoxRemoveTextBetweenParentheses.Checked       = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenParentheses;
            checkBoxRemoveTextBetweenBrackets.Checked          = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCurlyBrackets;
            checkBoxRemoveTextBetweenQuestionMarks.Checked     = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenQuestionMarks;
            checkBoxRemoveTextBetweenCustomTags.Checked        = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustom;
            checkBoxOnlyIfInSeparateLine.Checked               = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenOnlySeparateLines;
            checkBoxRemoveTextBeforeColon.Checked              = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColon;
            checkBoxRemoveTextBeforeColonOnlyUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyIfUppercase;
            checkBoxColonSeparateLine.Checked            = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine;
            checkBoxRemoveInterjections.Checked          = Configuration.Settings.RemoveTextForHearingImpaired.RemoveInterjections;
            checkBoxInterjectionOnlySeparateLine.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveInterjectionsOnlyOnSeparateLine;
            checkBoxRemoveWhereContains.Checked          = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains;
            checkBoxRemoveIfAllUppercase.Checked         = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfAllUppercase;
            checkBoxInterjectionOnlySeparateLine.Enabled = checkBoxRemoveInterjections.Checked;

            contextMenuStrip1.Items[0].Text = LanguageSettings.Current.Main.Menu.ContextMenu.SelectAll;
            contextMenuStrip1.Items[1].Text = LanguageSettings.Current.Main.Menu.Edit.InverseSelection;

            _language = LanguageSettings.Current.RemoveTextFromHearImpaired;
            Text      = _language.Title;
            groupBoxRemoveTextConditions.Text = _language.RemoveTextConditions;
            labelAnd.Text = _language.And;
            labelRemoveTextBetween.Text        = _language.RemoveTextBetween;
            checkBoxRemoveTextBeforeColon.Text = _language.RemoveTextBeforeColon;
            checkBoxRemoveTextBeforeColonOnlyUppercase.Text = _language.OnlyIfTextIsUppercase;
            checkBoxOnlyIfInSeparateLine.Text           = _language.OnlyIfInSeparateLine;
            checkBoxColonSeparateLine.Text              = _language.OnlyIfInSeparateLine;
            checkBoxRemoveTextBetweenBrackets.Text      = _language.Brackets;
            checkBoxRemoveTextBetweenParentheses.Text   = _language.Parentheses;
            checkBoxRemoveTextBetweenQuestionMarks.Text = _language.QuestionMarks;
            checkBoxRemoveTextBetweenSquares.Text       = _language.SquareBrackets;
            checkBoxRemoveWhereContains.Text            = _language.RemoveTextIfContains;
            checkBoxRemoveIfAllUppercase.Text           = _language.RemoveTextIfAllUppercase;
            checkBoxRemoveInterjections.Text            = _language.RemoveInterjections;
            checkBoxInterjectionOnlySeparateLine.Text   = _language.OnlyIfInSeparateLine;
            buttonEditInterjections.Text  = _language.EditInterjections;
            buttonEditInterjections.Left  = checkBoxRemoveInterjections.Left + checkBoxRemoveInterjections.Width;
            listViewFixes.Columns[0].Text = LanguageSettings.Current.General.Apply;
            listViewFixes.Columns[1].Text = LanguageSettings.Current.General.LineNumber;
            listViewFixes.Columns[2].Text = LanguageSettings.Current.General.Before;
            listViewFixes.Columns[3].Text = LanguageSettings.Current.General.After;
            labelText.Text    = LanguageSettings.Current.General.Text;
            buttonOK.Text     = LanguageSettings.Current.General.Ok;
            buttonCancel.Text = LanguageSettings.Current.General.Cancel;
            buttonApply.Text  = LanguageSettings.Current.General.Apply;
            UiUtil.FixLargeFonts(this, buttonOK);
            listViewFixes_SelectedIndexChanged(null, null);
        }
        public void RemoveTextDontCrashOnEmptyString()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = true;
            string text   = string.Empty;
            string actual = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(text, actual);
        }
        public void RemoveInterjectionsMDash()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveInterjections = true;
            const string text     = "I'm sorry. I, mm-hmm—";
            const string expected = "I'm sorry. I—";
            string       actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextIfUppercaseNotEmdash()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = true;
            string text     = "- And you?" + Environment.NewLine + "- I—";
            string expected = "- And you?" + Environment.NewLine + "- I—";
            string actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveInterjectionsItalicBothLines()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveInterjections = true;
            string       text     = "<i>- In my spare time.</i>" + Environment.NewLine + "<i>- Mm-hmm.</i>";
            const string expected = "<i>In my spare time.</i>";
            string       actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveFirstDashItalics()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveTextBetweenBrackets = true;
            string       text     = "<i>- A man who wants to make his mark..." + Environment.NewLine + "- [ Coughing]</i>";
            const string expected = "<i>A man who wants to make his mark...</i>";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextIfUppercaseEmdashRemoveInDialogueWithSpaces()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveTextBetweenCustomTags = false;
            target.Settings.RemoveInterjections         = true;
            string text     = "- Uh — uh, my God!" + Environment.NewLine + "- Uh, my God.";
            string expected = "- My God!" + Environment.NewLine + "- My God.";
            string actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextEmdashComma()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveTextBetweenCustomTags = false;
            target.Settings.RemoveInterjections         = true;
            string text     = "- I just, uh —" + Environment.NewLine + "- What?";
            string expected = "- I just —" + Environment.NewLine + "- What?";
            string actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextKeepMusicSymbolsButRemoveHi()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveTextBetweenCustomTags = false;
            target.Settings.RemoveTextBetweenBrackets   = true;
            target.Settings.RemoveIfTextContains        = null;
            const string text     = "<i>♪♪[Ambient Electronic]</i>";
            const string expected = "<i>♪♪</i>";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveHiNot()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = false;
            target.Settings.OnlyIfInSeparateLine = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "is the body of a mutant kid\r\non the 6:00 news.";
            const string expected = "is the body of a mutant kid\r\non the 6:00 news.";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveHiQuotes()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = false;
            target.Settings.OnlyIfInSeparateLine = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string       text     = "- Where?!" + Environment.NewLine + "- Ow!";
            const string expected = "Where?!";
            string       actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextRemoveEmdash()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveTextBetweenCustomTags = false;
            target.Settings.RemoveTextBetweenBrackets   = true;
            target.Settings.RemoveIfTextContains        = null;
            target.Settings.RemoveInterjections         = true;
            const string text     = "Oh — Oh, that's nice!";
            const string expected = "That's nice!";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveHi1()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase               = false;
            target.Settings.OnlyIfInSeparateLine               = false;
            target.Settings.RemoveTextBetweenSquares           = true;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "- Aw, save it. Storm?\r\n- [Storm]\r\nWe're outta here.";
            const string expected = "- Aw, save it. Storm?\r\n- We're outta here.";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveInterjections11()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = false;
            target.Settings.RemoveInterjections  = true;
            target.Settings.OnlyIfInSeparateLine = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string text     = "- Ballpark, mm-hm." + Environment.NewLine + "- Oh yes!";
            string expected = "- Ballpark." + Environment.NewLine + "- Yes!";
            string actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveInterjections9()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = false;
            target.Settings.RemoveInterjections  = true;
            target.Settings.OnlyIfInSeparateLine = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "You like her, huh.";
            const string expected = "You like her.";
            string       actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveInterjections10Italic()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = false;
            target.Settings.RemoveInterjections  = true;
            target.Settings.OnlyIfInSeparateLine = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string text     = "<i>- You like her, huh." + Environment.NewLine + "- I do</i>";
            string expected = "<i>- You like her." + Environment.NewLine + "- I do</i>";
            string actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveInterjections6BItalic()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase = false;
            target.Settings.RemoveInterjections  = true;
            target.Settings.OnlyIfInSeparateLine = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "<i>Mm-hm, Ballpark.</i>";
            const string expected = "<i>Ballpark.</i>";
            string       actual   = target.RemoveInterjections(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveHi2()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase               = false;
            target.Settings.OnlyIfInSeparateLine               = false;
            target.Settings.RemoveTextBetweenSquares           = true;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "[Chuckles,\r\nCoughing]\r\nBut we lived through it.";
            const string expected = "But we lived through it.";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveHiDouble()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase               = false;
            target.Settings.OnlyIfInSeparateLine               = false;
            target.Settings.RemoveTextBetweenSquares           = true;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "[MAN]Where?![MAN]";
            const string expected = "Where?!";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
Beispiel #21
0
        public FormRemoveTextForHearImpaired()
        {
            InitializeComponent();

            _removeTextForHILib = new RemoveTextForHI(GetSettings());

            checkBoxRemoveTextBetweenSquares.Checked       = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenBrackets;
            checkBoxRemoveTextBetweenParentheses.Checked   = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenParentheses;
            checkBoxRemoveTextBetweenBrackets.Checked      = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCurlyBrackets;
            checkBoxRemoveTextBetweenQuestionMarks.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenQuestionMarks;
            checkBoxRemoveTextBetweenCustomTags.Checked    = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustom;
            comboBoxCustomStart.Text              = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomBefore;
            comboBoxCustomEnd.Text                = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenCustomAfter;
            checkBoxOnlyIfInSeparateLine.Checked  = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBetweenOnlySeperateLines;
            checkBoxRemoveTextBeforeColon.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColon;
            checkBoxRemoveTextBeforeColonOnlyUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyIfUppercase;
            checkBoxColonSeparateLine.Checked    = Configuration.Settings.RemoveTextForHearingImpaired.RemoveTextBeforeColonOnlyOnSeparateLine;
            checkBoxRemoveInterjections.Checked  = Configuration.Settings.RemoveTextForHearingImpaired.RemoveInterjections;
            checkBoxRemoveWhereContains.Checked  = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContains;
            checkBoxRemoveIfAllUppercase.Checked = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfAllUppercase;
            comboBoxRemoveIfTextContains.Text    = Configuration.Settings.RemoveTextForHearingImpaired.RemoveIfContainsText;

            _language = Configuration.Settings.Language.RemoveTextFromHearImpaired;
            Text      = _language.Title;
            groupBoxRemoveTextConditions.Text = _language.RemoveTextConditions;
            labelAnd.Text = _language.And;
            labelRemoveTextBetween.Text        = _language.RemoveTextBetween;
            checkBoxRemoveTextBeforeColon.Text = _language.RemoveTextBeforeColon;
            checkBoxRemoveTextBeforeColonOnlyUppercase.Text = _language.OnlyIfTextIsUppercase;
            checkBoxOnlyIfInSeparateLine.Text           = _language.OnlyIfInSeparateLine;
            checkBoxColonSeparateLine.Text              = _language.OnlyIfInSeparateLine;
            checkBoxRemoveTextBetweenBrackets.Text      = _language.Brackets;
            checkBoxRemoveTextBetweenParentheses.Text   = _language.Parentheses;
            checkBoxRemoveTextBetweenQuestionMarks.Text = _language.QuestionMarks;
            checkBoxRemoveTextBetweenSquares.Text       = _language.SquareBrackets;
            checkBoxRemoveWhereContains.Text            = _language.RemoveTextIfContains;
            checkBoxRemoveIfAllUppercase.Text           = _language.RemoveTextIfAllUppercase;
            checkBoxRemoveInterjections.Text            = _language.RemoveInterjections;
            buttonEditInterjections.Text  = _language.EditInterjections;
            buttonEditInterjections.Left  = checkBoxRemoveInterjections.Left + checkBoxRemoveInterjections.Width;
            listViewFixes.Columns[0].Text = Configuration.Settings.Language.General.Apply;
            listViewFixes.Columns[1].Text = Configuration.Settings.Language.General.LineNumber;
            listViewFixes.Columns[2].Text = Configuration.Settings.Language.General.Before;
            listViewFixes.Columns[3].Text = Configuration.Settings.Language.General.After;
            buttonOK.Text     = Configuration.Settings.Language.General.Ok;
            buttonCancel.Text = Configuration.Settings.Language.General.Cancel;
            FixLargeFonts();
        }
        public void RemoveColonTest3()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.ColonSeparateLine     = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            const string text     = "Barry, remember: She cannot\r\nteleport if she cannot see.";
            const string expected = text;
            string       actual   = target.RemoveColon(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextBeforeColonOnlyUpper3Negative()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveInterjections   = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = true;
            target.Settings.ColonSeparateLine = false;
            const string text     = "RACHEL and ROSS: Hi there!";
            const string expected = "RACHEL and ROSS: Hi there!";
            string       actual   = target.RemoveColon(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveTextBeforeColonSecondLine()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveInterjections   = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string text     = "- even if it was one week." + Environment.NewLine + "CANNING: Objection.";
            string expected = "- even if it was one week." + Environment.NewLine + "- Objection.";
            string actual   = target.RemoveColon(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveColonTest2B()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.ColonSeparateLine     = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = true;
            const string text     = "GIOVANNI: <i>Number 9: I never look for a scapegoat.</i>";
            const string expected = "<i>Number 9: I never look for a scapegoat.</i>";
            string       actual   = target.RemoveColon(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveLineIfAllUppercase2()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = true;
            target.Settings.RemoveInterjections   = false;
            target.Settings.RemoveTextBeforeColon = false;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string       text     = "Please, Mr Krook." + Environment.NewLine + "SHOP DOOR BELL CLANGS";
            const string expected = "Please, Mr Krook.";
            string       actual   = target.RemoveLineIfAllUppercase(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveHiSecondLineDelay()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string text = "- JOHN: Hey." + Environment.NewLine +
                          "- ...hey.";
            string expected = "- Hey." + Environment.NewLine + "- ...hey.";
            string actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveColonTest()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.ColonSeparateLine     = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            const string text     = "Man over P.A.:\r\nGive back our homes.";
            const string expected = "Give back our homes.";
            string       actual   = target.RemoveColon(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveRemoveNameOfFirstLine()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveInterjections   = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            string text     = "HECTOR: Hi." + Environment.NewLine + "-Oh, hey, Hector.";
            string expected = "- Hi." + Environment.NewLine + "- Oh, hey, Hector.";
            string actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }
        public void RemoveRemoveNameOfFirstLineBold()
        {
            RemoveTextForHI target = GetRemoveTextForHiLib();

            target.Settings.RemoveIfAllUppercase  = false;
            target.Settings.RemoveInterjections   = false;
            target.Settings.RemoveTextBeforeColon = true;
            target.Settings.OnlyIfInSeparateLine  = false;
            target.Settings.RemoveTextBeforeColonOnlyUppercase = false;
            target.Settings.ColonSeparateLine = false;
            const string text     = "<b>HECTOR: Hi.</b>";
            const string expected = "<b>Hi.</b>";
            string       actual   = target.RemoveTextFromHearImpaired(text);

            Assert.AreEqual(expected, actual);
        }