Exemplo n.º 1
0
        public void TableLayoutPanel_CanExtend_Control_ReturnsExpected()
        {
            var control = new ScrollableControl();
            var panel   = new TableLayoutPanel();
            IExtenderProvider provider = panel;

            Assert.False(provider.CanExtend(control));
            panel.Controls.Add(control);
            Assert.True(provider.CanExtend(control));
        }
Exemplo n.º 2
0
        public void TableLayoutPanel_CanExtend_NotControl_ReturnsFalse(object obj)
        {
            var panel = new TableLayoutPanel();
            IExtenderProvider provider = panel;

            Assert.False(provider.CanExtend(obj));
        }
Exemplo n.º 3
0
        public void CanExtend_InvokeNoParent_ReturnsFalse(object extendee)
        {
            var panel = new FlowLayoutPanel();
            IExtenderProvider extenderProvider = panel;

            Assert.False(extenderProvider.CanExtend(extendee));
        }
Exemplo n.º 4
0
        public void FlowLayoutPanel_CanExtend_InvokeNoParent_ReturnsFalse(object extendee)
        {
            using var control = new FlowLayoutPanel();
            IExtenderProvider extenderProvider = control;

            Assert.False(extenderProvider.CanExtend(extendee));
        }
Exemplo n.º 5
0
        public void CanExtend_InvokeWithParent_ReturnsTrue()
        {
            var panel   = new FlowLayoutPanel();
            var control = new Control
            {
                Parent = panel
            };
            IExtenderProvider extenderProvider = panel;

            Assert.True(extenderProvider.CanExtend(control));
        }
Exemplo n.º 6
0
        public void FlowLayoutPanel_CanExtend_InvokeWithParent_ReturnsTrue()
        {
            using var control  = new FlowLayoutPanel();
            using var extendee = new Control
                  {
                      Parent = control
                  };
            IExtenderProvider extenderProvider = control;

            Assert.True(extenderProvider.CanExtend(extendee));
        }