コード例 #1
0
        public void PictureBox_RecreateImage_ShouldUseSizeFromInput()
        {
            var size       = new Size(300, 300);
            var pictureBox = new PictureBoxImageHolder();

            pictureBox.RecreateImage(new ImageSettings {
                Width = size.Width, Height = size.Height
            });

            pictureBox.GetImageSize().Should().Be(size);
        }
コード例 #2
0
ファイル: TagCreatorTests.cs プロジェクト: elizShtol/fp
        public void SetUp()
        {
            fontSettings  = new FontSettings();
            imageSettings = new ImageSettings();
            filesSettings = new FilesSettings();
            var imageHolder = new PictureBoxImageHolder();

            imageHolder.RecreateImage(imageSettings);
            tagCreator = new TagCreator(fontSettings, new SpiralCloudLayouter(imageSettings),
                                        new TextAnalyzer(filesSettings), imageHolder);

            filesSettings.TextFilePath        = @"..\..\testTextAnalyzer.txt";
            filesSettings.BoringWordsFilePath = @"..\..\boring words.txt";
        }
コード例 #3
0
ファイル: PainterTests.cs プロジェクト: elizShtol/fp
        public void SetUp()
        {
            imageSettings = new ImageSettings();
            var imageHolder = new PictureBoxImageHolder();

            imageHolder.RecreateImage(imageSettings);
            var colorSettingsProvider = new ColorSettingsProvider();
            var filesSettings         = new FilesSettings();

            filesSettings.TextFilePath        = "..\\..\\testTextAnalyzer.txt";
            filesSettings.BoringWordsFilePath = "..\\..\\boring words.txt";
            var textAnalyzer = new TextAnalyzer(filesSettings);

            fontSettings = new FontSettings();
            var tagCreator = new TagCreator(fontSettings, new SpiralCloudLayouter(imageSettings), textAnalyzer,
                                            imageHolder);

            painter = new Painter(colorSettingsProvider, imageHolder, tagCreator);
        }