public ITextStatistic Build(Stream stream)
        {
            Precondition.EnsureNotNull("stream", stream);

            IStreamConverter converter = new StreamConverter();
            string txt = converter.ToText(stream).ToLowerInvariant();

            ITextStatistic stats = new TextStatistic(txt);
            return stats.Build();
        }
예제 #2
0
 public void Ctor_ArgumentEmptyString_ArgumentNullException()
 {
     ITextStatistic stats = new TextStatistic(String.Empty);
     Assert.Fail("Shouldn't reach this code");
 }
예제 #3
0
 public void Ctor_ArgumentNull_ArgumentNullException()
 {
     ITextStatistic stats = new TextStatistic(null);
     Assert.Fail("Shouldn't reach this code");
 }
예제 #4
0
 public void Build_HavingEmptyText_ArgumentNullException()
 {
     ITextStatistic stats = new TextStatistic();
     stats.Build();
     Assert.Fail("Shouldn't reach this code");
 }