public TagsCloudVisualizator(ITagsCloudContainer tagsCloudContainer, IColorPicker[] colorPickers, Point center, Font textFont) { this.tagsCloudContainer = tagsCloudContainer; this.rectangleColorPicker = colorPickers[0]; this.textColorPicker = colorPickers[1]; this.image = new Bitmap(center.X * 2, center.Y * 2); TextFont = textFont; }
public void SetUp() { tagsCloudContainer = Substitute.For <ITagsCloudContainer>(); randomColorPiker = Substitute.For <IColorPicker>(); whiteColorPicker = Substitute.For <IColorPicker>(); center = new Point(1000, 1000); font = new Font(FontFamily.GenericMonospace, 16, FontStyle.Italic, GraphicsUnit.Point); tagsCloudVisualizator = new TagsCloudVisualizator(tagsCloudContainer, new IColorPicker[] { randomColorPiker, whiteColorPicker }, center, font); randomColorPiker.GenerateColor().Returns(new SolidBrush(Color.FromArgb(21, 213, 222))); whiteColorPicker.GenerateColor().Returns(Brushes.White); tagsCloudContainer.GetTagsRectangleData().Returns(new Dictionary <string, Rectangle>() { { "dasda", new Rectangle() }, { "das21da", new Rectangle() }, }); }