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); }
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)); }