public void ShuffleClauserUnits_when_clauserAtStartOfSentence_DontMoveIt() { const string unShuffledSentence = "CSbefore he VBhad a chance VBto speak BKP, PRENThe meeting VBwas over BKP."; Paragraph paragraph = DocumentContentHelper.GetParagraphFromWordDocument(unShuffledSentence); var clauserUnitStrategy = new ClauserUnitStrategy(new ClauserUnitChecker()); // act var shufflerParagraph = clauserUnitStrategy.ShuffleSentenceUnit(paragraph); // assert Assert.That(shufflerParagraph.InnerText, Is.EqualTo( "CSbefore he VBhad a chance VBto speak BKP, PRENThe meeting VBwas over BKP.")); }
public void ShuffleClauserUnits_ToTheBeginningOfTheSentenceAndAddComma() { const string unShuffledSentence = "TMIn April and May BKP, CShowever BKP, PRENthe NNreport VBwasn’t ADJgood BKP."; Paragraph paragraph = DocumentContentHelper.GetParagraphFromWordDocument(unShuffledSentence); var clauserUnitStrategy = new ClauserUnitStrategy(new ClauserUnitChecker()); // act var shufflerParagraph = clauserUnitStrategy.ShuffleSentenceUnit(paragraph); // assert Assert.That(shufflerParagraph.InnerText, Is.EqualTo( "CShowever BKP, TMIn April and May BKP, PRENthe NNreport VBwasn’t ADJgood BKP.")); }
public void ShuffleClauserUnits_ToTheBeginningOfTheSentenceAndAddsComma_WhenSpaceElementBeforeComma( string sentenceFile, string expectation) { string unShuffledSentence = sentenceFile; Paragraph paragraph = DocumentContentHelper.GetParagraphFromWordDocument(unShuffledSentence); var clauserUnitStrategy = new ClauserUnitStrategy(new ClauserUnitChecker()); // act var shufflerParagraph = clauserUnitStrategy.ShuffleSentenceUnit(paragraph); // assert Assert.That(shufflerParagraph.InnerText, Is.EqualTo( expectation)); // multiple clauser units? // what if the bkp is a ? or ! }