public void OnSetComponentDefaultsTest() { using TestControlDesigner controlDesigner = new TestControlDesigner(); using Button button = new Button(); controlDesigner.Initialize(button); #pragma warning disable CS0618 // Type or member is obsolete controlDesigner.OnSetComponentDefaults(); #pragma warning restore CS0618 }
public void OnSetComponentDefaultsTest() { TestControlDesigner controlDesigner = new TestControlDesigner(); #pragma warning disable 618 Assert.NotNull(controlDesigner); controlDesigner.Initialize(new Button()); try { controlDesigner.OnSetComponentDefaults(); } catch (Exception ex) { Assert.True(false, "Expected no exception, but got: " + ex.Message); } #pragma warning restore 618 }