Example #1
0
        public void Height_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IVkontakteCommunityWidgetExtensions.Height(null, 0));

            new VkontakteCommunityWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Height(1), widget));
                Assert.Equal("1", widget.Height());
            });
        }
Example #2
0
        public void Mode_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IVkontakteCommunityWidgetExtensions.Mode(null, VkontakteCommunityMode.News));

            new VkontakteCommunityWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Mode(VkontakteCommunityMode.Participants), widget));
                Assert.Equal(0, widget.Mode());
            });
            Assert.Equal(1, new VkontakteCommunityWidget().Do(widget => widget.Mode(VkontakteCommunityMode.Title).Mode()));
            Assert.Equal(2, new VkontakteCommunityWidget().Do(widget => widget.Mode(VkontakteCommunityMode.News).Mode()));
        }