コード例 #1
0
        public void IsToolVisible_NewsViewInPureMvc_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Mvc);
            var result = filter.IsToolVisible(new ToolboxItemProxy() { ControlType = typeof(NewsView).AssemblyQualifiedName });

            Assert.IsTrue(result, "Grid control toolbox filter should not be filtering non-layout controls.");
        }
コード例 #2
0
        public void IsToolVisible_GridLayoutControlInWebForms_ReturnsFalse()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.WebForms);
            var result = filter.IsToolVisible(new ToolboxItemProxy() { ControlType = typeof(GridControl).AssemblyQualifiedName });

            Assert.IsFalse(result, "Gid controls should not be visible in WebForms.");
        }
コード例 #3
0
        public void IsToolVisible_GridLayoutControlInPureMvc_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Mvc);
            var result = filter.IsToolVisible(new ToolboxItemProxy() { ControlType = typeof(GridControl).AssemblyQualifiedName });

            Assert.IsTrue(result, "Grid controls should be visible in Pure MVC.");
        }
コード例 #4
0
        public void IsSectionVisible_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Hybrid);
            var result = filter.IsSectionVisible(null);

            Assert.IsTrue(result, "Grid control toolbox filter should not filter sections.");
        }
コード例 #5
0
        public void IsToolVisible_NonGridLayoutControlInHybrid_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Hybrid);
            var result = filter.IsToolVisible(new ToolboxItemProxy() { ControlType = typeof(LayoutControl).AssemblyQualifiedName });

            Assert.IsTrue(result, "Default layout controls should be visible in Hybrid mode.");
        }
コード例 #6
0
        public void IsToolVisible_NullArguments_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Hybrid);
            var result = filter.IsToolVisible(null);

            Assert.IsTrue(result, "Grid control toolbox filter should not be filtering on null arguments.");
        }