예제 #1
0
        public void CanExtendTest()
        {
            Control myControl = new Control();
            Form    myForm    = new Form();

            myForm.ShowInTaskbar = false;
            ToolBar       myToolBar       = new ToolBar();
            ErrorProvider myErrorProvider = new ErrorProvider();

            Assert.AreEqual(myErrorProvider.CanExtend(myControl), true, "#ext1");
            Assert.AreEqual(myErrorProvider.CanExtend(myToolBar), false, "#ext2");
            Assert.AreEqual(myErrorProvider.CanExtend(myForm), false, "#ext3");
            myForm.Dispose();
        }
예제 #2
0
        public void ErrorProvider_CanExtend_Invoke_ReturnsExpected(object extendee, bool expected)
        {
            var provider = new ErrorProvider();

            Assert.Equal(expected, provider.CanExtend(extendee));
        }