Esempio n. 1
0
        public void ButtonTest()
        {
            var button = new CtaButton("/somepage.html")
            {
                "Call To Action"
            };

            var expected = "<a class=\"btn btn-primary btn-lg\" href=\"/somepage.html\">Call To Action</a>";

            Assert.AreEqual(expected, button.ToHtml());
        }
        void ReleaseDesignerOutlets()
        {
            if (CtaButton != null)
            {
                CtaButton.Dispose();
                CtaButton = null;
            }

            if (CtaDescription != null)
            {
                CtaDescription.Dispose();
                CtaDescription = null;
            }

            if (CtaTitle != null)
            {
                CtaTitle.Dispose();
                CtaTitle = null;
            }

            if (CtaView != null)
            {
                CtaView.Dispose();
                CtaView = null;
            }

            if (CtaViewToTopConstraint != null)
            {
                CtaViewToTopConstraint.Dispose();
                CtaViewToTopConstraint = null;
            }

            if (DismissButton != null)
            {
                DismissButton.Dispose();
                DismissButton = null;
            }

            if (NotReallyLabel != null)
            {
                NotReallyLabel.Dispose();
                NotReallyLabel = null;
            }

            if (NotReallyView != null)
            {
                NotReallyView.Dispose();
                NotReallyView = null;
            }

            if (QuestionView != null)
            {
                QuestionView.Dispose();
                QuestionView = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (YesLabel != null)
            {
                YesLabel.Dispose();
                YesLabel = null;
            }

            if (YesView != null)
            {
                YesView.Dispose();
                YesView = null;
            }

            if (CtaViewBottomConstraint != null)
            {
                CtaViewBottomConstraint.Dispose();
                CtaViewBottomConstraint = null;
            }

            if (QuestionViewBottomConstraint != null)
            {
                QuestionViewBottomConstraint.Dispose();
                QuestionViewBottomConstraint = null;
            }
        }