Пример #1
0
        public void Height_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IVkontakteLikeButtonWidgetExtensions.Height(null, 0));

            new VkontakteLikeButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Height(1), widget));
                Assert.Equal("1", widget.Height());
            });
        }
Пример #2
0
        public void Verb_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IVkontakteLikeButtonWidgetExtensions.Verb(null, VkontakteLikeButtonVerb.Interest));

            new VkontakteLikeButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Verb(VkontakteLikeButtonVerb.Like), widget));
                Assert.Equal(0, widget.Verb().Value);
            });
            new VkontakteLikeButtonWidget().Do(widget => Assert.Equal(1, widget.Verb(VkontakteLikeButtonVerb.Interest).Verb().Value));
        }
Пример #3
0
        public void Layout_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IVkontakteLikeButtonWidgetExtensions.Width(null, 0));

            new VkontakteLikeButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Layout(VkontakteLikeButtonLayout.Button), widget));
                Assert.Equal("button", widget.Layout());
            });
            new VkontakteLikeButtonWidget().Do(widget => Assert.Equal("full", widget.Layout(VkontakteLikeButtonLayout.Full).Layout()));
            new VkontakteLikeButtonWidget().Do(widget => Assert.Equal("mini", widget.Layout(VkontakteLikeButtonLayout.Mini).Layout()));
            new VkontakteLikeButtonWidget().Do(widget => Assert.Equal("vertical", widget.Layout(VkontakteLikeButtonLayout.Vertical).Layout()));
        }