6 references to CreateComponent
System.Windows.Forms.Design.Tests (6)
System\ComponentModel\Design\DesignSurfaceTests.cs (6)
1025
ComponentWithPublicConstructor instance = Assert.IsType<ComponentWithPublicConstructor>(surface.
CreateComponent
(typeof(ComponentWithPublicConstructor)));
1033
ComponentWithPrivateDefaultConstructor instance = Assert.IsType<ComponentWithPrivateDefaultConstructor>(surface.
CreateComponent
(typeof(ComponentWithPrivateDefaultConstructor)));
1041
ComponentWithIContainerConstructor instance = Assert.IsType<ComponentWithIContainerConstructor>(surface.
CreateComponent
(typeof(ComponentWithIContainerConstructor)));
1051
Assert.Null(surface.
CreateComponent
(type));
1062
Assert.Throws<MissingMethodException>(() => surface.
CreateComponent
(type));
1069
Assert.Throws<ArgumentNullException>("type", () => surface.
CreateComponent
(null));