public void SentenceUtil_CountWord_ReturnInvertedStringWithOutNewLines() { var classicCounterLogic = new ClassicCounterLogic(); var expectedString = "2 - this2 - is1 - a1 - sentence1 - so"; var senteceUtil = new SentenceUtil(classicCounterLogic, "{1} - {0}", false); var computedString = senteceUtil.CountWords("This is a sentence, so is this."); Assert.IsTrue(expectedString.Equals(computedString)); }
public void SentenceUtil_CountWord_ReturnStringWithOutNewLines() { var classicCounterLogic = new ClassicCounterLogic(); var expectedString = "this - 2is - 2a - 1sentence - 1so - 1"; var senteceUtil = new SentenceUtil(classicCounterLogic, "{0} - {1}", false); var computedString = senteceUtil.CountWords("This is a sentence, so is this."); Assert.IsTrue(expectedString.Equals(computedString)); }
public void SentenceUtil_Constructor_CreatesCorrectObject() { var classicCounterLogic = new ClassicCounterLogic(); var senteceUtil = new SentenceUtil(classicCounterLogic, "{0} - {1}"); Assert.IsNotNull(senteceUtil); senteceUtil = null; }