Exemplo n.º 1
0
        public void White_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IPinterestPinItButtonWidgetExtensions.White(null));

            new PinterestPinItButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.White(), widget));
                Assert.Equal("white", widget.Color());
            });
        }
Exemplo n.º 2
0
        public void Language_Method()
        {
            Assert.Throws <ArgumentNullException>(() => IPinterestPinItButtonWidgetExtensions.Language(null, CultureInfo.InvariantCulture));
            Assert.Throws <ArgumentNullException>(() => new PinterestPinItButtonWidget().Language((CultureInfo)null));

            new PinterestPinItButtonWidget().Do(widget =>
            {
                Assert.True(ReferenceEquals(widget.Language(CultureInfo.CurrentCulture), widget));
                Assert.Equal(CultureInfo.CurrentCulture.TwoLetterISOLanguageName, widget.Language());
            });
        }