예제 #1
0
        public void ColorScheme_Method()
        {
            Assert.Throws <ArgumentNullException>(() => ITumblrShareButtonWidgetExtensions.ColorScheme(null, TumblrShareButtonColorScheme.Gray));

            new TumblrShareButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.ColorScheme(TumblrShareButtonColorScheme.Gray), widget));
                Assert.Equal("gray", widget.ColorScheme(TumblrShareButtonColorScheme.Gray).ColorScheme());
                Assert.Equal("light", widget.ColorScheme(TumblrShareButtonColorScheme.Light).ColorScheme());
            });
        }
예제 #2
0
        public void Type_Method()
        {
            Assert.Throws <ArgumentNullException>(() => ITumblrShareButtonWidgetExtensions.Type(null, 0));

            new TumblrShareButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Type(TumblrShareButtonType.First), widget));
                Assert.Equal(1, widget.Type());
                Assert.Equal(2, widget.Type(TumblrShareButtonType.Second).Type());
                Assert.Equal(3, widget.Type(TumblrShareButtonType.Third).Type());
                Assert.Equal(4, widget.Type(TumblrShareButtonType.Forth).Type());
            });
        }