7 references to CreateInstance
System.Windows.Forms.Design.Tests (7)
System\ComponentModel\Design\DesignSurfaceTests.cs (7)
1078
Assert.IsType<ClassWithPublicConstructor>(surface.
CreateInstance
(typeof(ClassWithPublicConstructor)));
1085
Assert.IsType<ClassWithPrivateDefaultConstructor>(surface.
CreateInstance
(typeof(ClassWithPrivateDefaultConstructor)));
1092
ComponentWithPublicConstructor instance = Assert.IsType<ComponentWithPublicConstructor>(surface.
CreateInstance
(typeof(ComponentWithPublicConstructor)));
1100
ComponentWithPrivateDefaultConstructor instance = Assert.IsType<ComponentWithPrivateDefaultConstructor>(surface.
CreateInstance
(typeof(ComponentWithPrivateDefaultConstructor)));
1108
ComponentWithIContainerConstructor instance = Assert.IsType<ComponentWithIContainerConstructor>(surface.
CreateInstance
(typeof(ComponentWithIContainerConstructor)));
1120
Assert.Throws<MissingMethodException>(() => surface.
CreateInstance
(type));
1127
Assert.Throws<ArgumentNullException>("type", () => surface.
CreateInstance
(null));