Пример #1
0
        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));
        }
Пример #2
0
        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));
        }
Пример #3
0
        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));
        }