示例#1
0
        public void DrawResult_ShouldBeFail_WhenNonExistentFont()
        {
            settings.FontFamily = "Some very strange font family";
            var drawer = new TagDrawer(settings, fakeLayouter);

            drawer.DrawTagCloud(tags).Error.Should().Be("Font wasn't found on the system.");
        }
示例#2
0
        public void DrawResult_ShouldBeFail_WhenTagCloudOutOfBorder()
        {
            settings.ImageSize = new Size(25, 200);
            var drawer = new TagDrawer(settings, fakeLayouter);

            drawer.DrawTagCloud(tags).Error.Should().Be("Tag cloud didn't fit on the image.\n" +
                                                        "Try increasing the image size or decreasing the font size");
        }
示例#3
0
        public void DrawResult_ShouldBeOk_WhenAllSettingsCorrect()
        {
            var drawer = new TagDrawer(settings, fakeLayouter);

            drawer.DrawTagCloud(tags).IsSuccess.Should().BeTrue();
        }