public void DrawTagCloud_ShouldCorrectWorkVisualizer() { var filteringWord = new[] { "aba", "abc" }; A.CallTo(() => filter.Filtering(A <IEnumerable <string> > .Ignored)).Returns(filteringWord); var rectangles = new[] { new Rectangle(0, 0, 50, 50), new Rectangle(50, 50, 50, 50) }; A.CallTo(() => rectangleGenerator.PutNextRectangle(A <Size> .Ignored)).Returns(rectangles[1]).Once(); A.CallTo(() => rectangleGenerator.PutNextRectangle(A <Size> .Ignored)).Returns(rectangles[0]).Once(); tagCloudVisualizator.DrawTagCloud("", TagsCloudSetting.GetDefault()); A.CallTo(() => visualizer.DrawTag(A <TagRectangle> .That.Matches(x => x.Equals(new TagRectangle(filteringWord[0], rectangles[0]))), A <Font> .Ignored)) .MustHaveHappenedOnceExactly(); A.CallTo(() => visualizer.DrawTag(A <TagRectangle> .That.Matches(x => x.Equals(new TagRectangle(filteringWord[1], rectangles[1]))), A <Font> .Ignored)) .MustHaveHappenedOnceExactly(); }