Exemplo n.º 1
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.");
        }
Exemplo n.º 2
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.");
        }
Exemplo n.º 3
0
        public void IsToolVisible_NonGridLayoutControlInWebFormsOnly_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.WebForms);
            var result = filter.IsToolVisible(new ToolboxItemProxy()
            {
                ControlType = typeof(LayoutControl).AssemblyQualifiedName
            });

            Assert.IsTrue(result, "Default layout controls should be visible in WebForm mode.");
        }
Exemplo n.º 4
0
        public void IsToolVisible_NonGridLayoutControlInPureMvc_ReturnsFalse()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Mvc);
            var result = filter.IsToolVisible(new ToolboxItemProxy()
            {
                ControlType = typeof(LayoutControl).AssemblyQualifiedName
            });

            Assert.IsFalse(result, "Default layout control should not be visible in Pure MVC.");
        }
Exemplo n.º 5
0
        public void IsToolVisible_NewsViewInHybrid_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Hybrid);
            var result = filter.IsToolVisible(new ToolboxItemProxy()
            {
                ControlType = typeof(NewsView).AssemblyQualifiedName
            });

            Assert.IsTrue(result, "Grid control toolbox filter should not be filtering non-layout controls.");
        }
Exemplo n.º 6
0
        public void IsToolVisible_GridLayoutControlInHybrid_ReturnsTrue()
        {
            var filter = new GridControlToolboxFilter(() => PageTemplateFramework.Hybrid);
            var result = filter.IsToolVisible(new ToolboxItemProxy()
            {
                ControlType = typeof(GridControl).AssemblyQualifiedName
            });

            Assert.IsTrue(result, "Grid controls should be visible in Hybrid.");
        }
Exemplo n.º 7
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.");
        }