public void Ctor_Default() { var control = new SubContainerControl(); Assert.Null(control.ActiveControl); Assert.False(control.AutoScroll); Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor); Assert.Equal(AutoScaleMode.Inherit, control.AutoScaleMode); Assert.Equal(Size.Empty, control.AutoScrollMargin); Assert.Equal(Point.Empty, control.AutoScrollPosition); Assert.Equal(AutoValidate.EnablePreventFocusChange, control.AutoValidate); Assert.NotNull(control.BindingContext); Assert.Same(control.BindingContext, control.BindingContext); Assert.Equal(Rectangle.Empty, control.Bounds); Assert.False(control.CanEnableIme); Assert.True(control.CanProcessMnemonic()); Assert.Equal(Size.Empty, control.ClientSize); Assert.Equal(Rectangle.Empty, control.ClientRectangle); Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); Assert.NotNull(control.DockPadding); Assert.Same(control.DockPadding, control.DockPadding); Assert.Equal(0, control.DockPadding.Top); Assert.Equal(0, control.DockPadding.Bottom); Assert.Equal(0, control.DockPadding.Left); Assert.Equal(0, control.DockPadding.Right); Assert.Equal(Rectangle.Empty, control.DisplayRectangle); Assert.NotNull(control.HorizontalScroll); Assert.Same(control.HorizontalScroll, control.HorizontalScroll); Assert.False(control.HScroll); Assert.Equal(Padding.Empty, control.Padding); Assert.Null(control.ParentForm); Assert.Equal(RightToLeft.No, control.RightToLeft); Assert.NotNull(control.VerticalScroll); Assert.Same(control.VerticalScroll, control.VerticalScroll); Assert.False(control.VScroll); Assert.True(control.Visible); }
public void ContainerControl_Ctor_Default() { var control = new SubContainerControl(); Assert.Null(control.ActiveControl); Assert.False(control.AllowDrop); Assert.Equal(AnchorStyles.Top | AnchorStyles.Left, control.Anchor); Assert.False(control.AutoScroll); Assert.Equal(SizeF.Empty, control.AutoScaleDimensions); Assert.Equal(new SizeF(1, 1), control.AutoScaleFactor); Assert.Equal(Size.Empty, control.AutoScrollMargin); Assert.Equal(AutoScaleMode.Inherit, control.AutoScaleMode); Assert.Equal(Size.Empty, control.AutoScrollMinSize); Assert.Equal(Point.Empty, control.AutoScrollPosition); Assert.False(control.AutoSize); Assert.Equal(Control.DefaultBackColor, control.BackColor); Assert.Null(control.BackgroundImage); Assert.Equal(ImageLayout.Tile, control.BackgroundImageLayout); Assert.NotNull(control.BindingContext); Assert.Same(control.BindingContext, control.BindingContext); Assert.Equal(0, control.Bottom); Assert.Equal(Rectangle.Empty, control.Bounds); Assert.False(control.CanEnableIme); Assert.True(control.CanRaiseEvents); Assert.True(control.CanProcessMnemonic()); Assert.True(control.CausesValidation); Assert.Equal(Rectangle.Empty, control.ClientRectangle); Assert.Equal(Size.Empty, control.ClientSize); Assert.Null(control.Container); Assert.Empty(control.Controls); Assert.Same(control.Controls, control.Controls); Assert.False(control.Created); Assert.Equal(SizeF.Empty, control.CurrentAutoScaleDimensions); Assert.Same(Cursors.Default, control.Cursor); Assert.Same(Cursors.Default, control.DefaultCursor); Assert.Equal(ImeMode.Inherit, control.DefaultImeMode); Assert.Equal(new Padding(3), control.DefaultMargin); Assert.Equal(Size.Empty, control.DefaultMaximumSize); Assert.Equal(Size.Empty, control.DefaultMinimumSize); Assert.Equal(Padding.Empty, control.DefaultPadding); Assert.Equal(Size.Empty, control.DefaultSize); Assert.False(control.DesignMode); Assert.Equal(Rectangle.Empty, control.DisplayRectangle); Assert.Equal(DockStyle.None, control.Dock); Assert.NotNull(control.DockPadding); Assert.Same(control.DockPadding, control.DockPadding); Assert.Equal(0, control.DockPadding.Top); Assert.Equal(0, control.DockPadding.Bottom); Assert.Equal(0, control.DockPadding.Left); Assert.Equal(0, control.DockPadding.Right); Assert.True(control.Enabled); Assert.NotNull(control.Events); Assert.Same(control.Events, control.Events); Assert.Equal(Control.DefaultFont, control.Font); Assert.Equal(Control.DefaultForeColor, control.ForeColor); Assert.False(control.HasChildren); Assert.Equal(0, control.Height); Assert.NotNull(control.HorizontalScroll); Assert.Same(control.HorizontalScroll, control.HorizontalScroll); Assert.False(control.HScroll); Assert.Equal(ImeMode.NoControl, control.ImeMode); Assert.Equal(ImeMode.NoControl, control.ImeModeBase); Assert.Equal(0, control.Left); Assert.Equal(Point.Empty, control.Location); Assert.Equal(Padding.Empty, control.Padding); Assert.Equal(0, control.Right); Assert.Equal(RightToLeft.No, control.RightToLeft); Assert.Null(control.Site); Assert.Equal(Size.Empty, control.Size); Assert.Equal(0, control.TabIndex); Assert.True(control.TabStop); Assert.Empty(control.Text); Assert.Equal(0, control.Top); Assert.True(control.Visible); Assert.NotNull(control.VerticalScroll); Assert.Same(control.VerticalScroll, control.VerticalScroll); Assert.False(control.VScroll); Assert.Equal(0, control.Width); }