示例#1
0
 public void SetUp()
 {
     wordsSizes        = new Dictionary <string, int>();
     fakeWordFormatter = A.Fake <IWordFormatter>();
     normalizer        = new WordsNormalizer(new [] { fakeWordFormatter });
     A.CallTo(() => fakeWordFormatter.GetFormatted(A <string> .Ignored)).ReturnsLazily((string word) => word);
 }
示例#2
0
        public void NormalizeToWordsSizes_PassWords_FormatterWillRunForEach()
        {
            var words = new[] { "css", "css", "html" };

            wordsSizes = normalizer.NormalizeToWordsSizes(words);

            A.CallTo(() => fakeWordFormatter.GetFormatted(A <string> .Ignored))
            .MustHaveHappened(Repeated.Exactly.Times(words.Length));
        }