public void DesignSurface_CreateDesigner_NullComponent_ThrowsArgumentNullException() { var surface = new DesignSurface(); Assert.Throws <ArgumentNullException>("component", () => surface.CreateDesigner(null, true)); Assert.Throws <ArgumentNullException>("component", () => surface.CreateDesigner(null, false)); }
public void DesignSurface_CreateDesigner_Disposed_ThrowsObjectDisposedException() { var surface = new DesignSurface(); surface.Dispose(); Assert.Throws <ObjectDisposedException>(() => surface.CreateDesigner(new Component(), true)); Assert.Throws <ObjectDisposedException>(() => surface.CreateDesigner(new Component(), false)); }
public void DesignSurface_CreateDesigner_InvokeIRootDesigner_ReturnsExpected() { var surface = new DesignSurface(); var component = new RootDesignerComponent(); Assert.IsType <RootComponentDesigner>(surface.CreateDesigner(component, rootDesigner: true)); Assert.Null(surface.CreateDesigner(component, rootDesigner: false)); }