Esempio n. 1
0
        public void RenderOptionsReadOnly()
        {
            Control.Stub(stub => stub.IsIconEnabled()).Return(true);
            Control.Stub(stub => stub.IsReadOnly).Return(true);

            var renderer = new TestableBocReferenceValueRenderer(
                _resourceUrlFactoryStub,
                GlobalizationService,
                RenderingFeatures.Default,
                () => new StubDropDownList());

            Html.Writer.AddAttribute(HtmlTextWriterAttribute.Class, "body");
            Html.Writer.RenderBeginTag(HtmlTextWriterTag.Span);
            renderer.RenderOptionsMenuTitle(CreateRenderingContext());
            Html.Writer.RenderEndTag();

            var document = Html.GetResultDocument();

            AssertReadOnlyContent(document);
        }
Esempio n. 2
0
        public void RenderOptions()
        {
            var renderer = new TestableBocReferenceValueRenderer(
                _resourceUrlFactoryStub,
                GlobalizationService,
                RenderingFeatures.Default,
                () => new StubDropDownList());

            Control.Stub(stub => stub.HasValueEmbeddedInsideOptionsMenu).Return(true);
            Control.Stub(stub => stub.HasOptionsMenu).Return(true);

            Html.Writer.AddAttribute(HtmlTextWriterAttribute.Class, "body");
            Html.Writer.RenderBeginTag(HtmlTextWriterTag.Span);
            renderer.RenderOptionsMenuTitle(CreateRenderingContext());
            Html.Writer.RenderEndTag();

            var document = Html.GetResultDocument();

            AssertControl(document, OptionMenuConfiguration.EmbeddedOptionsMenu);
        }