7 references to CreateInstance
System.Windows.Forms.Design.Tests (7)
System\ComponentModel\Design\DesignSurfaceTests.cs (7)
1076
Assert.IsType<ClassWithPublicConstructor>(surface.
CreateInstance
(typeof(ClassWithPublicConstructor)));
1083
Assert.IsType<ClassWithPrivateDefaultConstructor>(surface.
CreateInstance
(typeof(ClassWithPrivateDefaultConstructor)));
1090
ComponentWithPublicConstructor instance = Assert.IsType<ComponentWithPublicConstructor>(surface.
CreateInstance
(typeof(ComponentWithPublicConstructor)));
1098
ComponentWithPrivateDefaultConstructor instance = Assert.IsType<ComponentWithPrivateDefaultConstructor>(surface.
CreateInstance
(typeof(ComponentWithPrivateDefaultConstructor)));
1106
ComponentWithIContainerConstructor instance = Assert.IsType<ComponentWithIContainerConstructor>(surface.
CreateInstance
(typeof(ComponentWithIContainerConstructor)));
1118
Assert.Throws<MissingMethodException>(() => surface.
CreateInstance
(type));
1125
Assert.Throws<ArgumentNullException>("type", () => surface.
CreateInstance
(null));