Exemple #1
0
        public void RenderCellWithPopulatedMenu()
        {
            InitializeRowMenus();
            Menu.MenuItems.Add(
                new WebMenuItem(
                    "itemId",
                    "category",
                    "text",
                    new IconInfo("~/Images/NullImage.gif"),
                    new IconInfo("~/Images/NullImage.gif"),
                    WebMenuItemStyle.Text,
                    RequiredSelection.Any,
                    false,
                    new Command()));

            IBocColumnRenderer renderer = new BocDropDownMenuColumnQuirksModeRenderer(new FakeResourceUrlFactory(), _bocListQuirksModeCssClassDefinition);

            renderer.RenderDataCell(_renderingContext, 0, false, EventArgs);

            var document = Html.GetResultDocument();

            var td = Html.GetAssertedChildElement(document, "td", 0);

            Html.AssertAttribute(td, "class", _bocListQuirksModeCssClassDefinition.DataCellOdd);

            var div = Html.GetAssertedChildElement(td, "div", 0);

            Html.AssertAttribute(div, "onclick", "BocList_OnCommandClick();");

            Html.AssertTextNode(div, "mocked dropdown menu", 0);
        }
Exemple #2
0
        public void RenderCellWithEmptyMenu()
        {
            InitializeRowMenus();

            IBocColumnRenderer renderer = new BocDropDownMenuColumnQuirksModeRenderer(new FakeResourceUrlFactory(), _bocListQuirksModeCssClassDefinition);

            renderer.RenderDataCell(_renderingContext, 0, false, EventArgs);

            var document = Html.GetResultDocument();

            var td = Html.GetAssertedChildElement(document, "td", 0);

            Html.AssertAttribute(td, "class", _bocListQuirksModeCssClassDefinition.DataCellOdd);

            var div = Html.GetAssertedChildElement(td, "div", 0);

            Html.AssertAttribute(div, "onclick", "BocList_OnCommandClick();");

            Html.AssertTextNode(div, "mocked dropdown menu", 0);
        }