public void WidthComboBox_ClickTest()
        {
            IDrawingFeatures drawingFeatures = new DrawingFeaturesMock();

            Pen expected = new Pen(Color.Black,40);

            OperationsOnToolButtons target = new OperationsOnToolButtons(drawingFeatures);

            ComboBox sender = new ComboBox();
            sender.Items.AddRange(new object[] { "1", "5", "20", "40" });
            sender.SelectedIndex = 3;

            EventArgs e = new EventArgs();

            target.WidthComboBox_Click(sender, e);

            Pen actual = drawingFeatures.Pencil;

            Assert.AreEqual(expected.Width, actual.Width);
        }
Esempio n. 2
0
        public ToolButtonsBuilder(IDrawingFeatures drawingFeatures, PaintForm paintForm)
        {
            _paintForm = paintForm;

            _operationsOnToolButtons = new OperationsOnToolButtons(drawingFeatures);
        }