public void CountTest(string str, double expectedResult) { var length = new AverageWordsLengthCounter(str); var result = length.Count(); Assert.That(result, Is.EqualTo(expectedResult)); }
public void CountExceptionTest(string str) { var length = new AverageWordsLengthCounter(str); void Result() => length.Count(); Assert.Throws(Is.TypeOf <ArgumentException>() .And.Message.EqualTo("Was printed the string without words"), Result); }