예제 #1
0
 public void HookChildControlsTest()
 {
     using TestControlDesigner controlDesigner = new TestControlDesigner();
     using Button button = new Button();
     controlDesigner.Initialize(button);
     controlDesigner.HookChildControlsMethod(new Control());
 }
예제 #2
0
        public void HookChildControlsTest()
        {
            TestControlDesigner controlDesigner = new TestControlDesigner();

            Assert.NotNull(controlDesigner);
            controlDesigner.Initialize(new Button());
            try
            {
                controlDesigner.HookChildControlsMethod(new Control());
            }
            catch (Exception ex)
            {
                Assert.True(false, "Expected no exception, but got: " + ex.Message);
            }
        }