public void Constructors()
 {
   var widget = new VideoJSPlayerWidget();
   Assert.Null(widget.Extra());
   Assert.Null(widget.Width());
   Assert.Null(widget.Height());
   Assert.False(widget.Videos().Any());
 }
Beispiel #2
0
        public void Constructors()
        {
            var widget = new VideoJSPlayerWidget();

            Assert.Null(widget.Extra());
            Assert.Null(widget.Width());
            Assert.Null(widget.Height());
            Assert.False(widget.Videos().Any());
        }
    public void Videos_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new VideoJSPlayerWidget().Videos(null));

      var widget = new VideoJSPlayerWidget();
      Assert.False(widget.Videos().Any());
      Assert.True(ReferenceEquals(widget.Videos(new MediaSource("url", "contentType")), widget));
      Assert.True(widget.Videos().SequenceEqual(new [] { new MediaSource("url", "contentType") }));
    }
Beispiel #4
0
        public void Videos_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new VideoJSPlayerWidget().Videos(null));

            var widget = new VideoJSPlayerWidget();

            Assert.False(widget.Videos().Any());
            Assert.True(ReferenceEquals(widget.Videos(new MediaSource("url", "contentType")), widget));
            Assert.True(widget.Videos().SequenceEqual(new [] { new MediaSource("url", "contentType") }));
        }
    public void Height_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new VideoJSPlayerWidget().Height(null));
      Assert.Throws<ArgumentException>(() => new VideoJSPlayerWidget().Height(string.Empty));

      var widget = new VideoJSPlayerWidget();
      Assert.Null(widget.Height());
      Assert.True(ReferenceEquals(widget.Height("height"), widget));
      Assert.Equal("height", widget.Height());
    }
    public void Width_Method()
    {
      Assert.Throws<ArgumentNullException>(() => new VideoJSPlayerWidget().Width(null));
      Assert.Throws<ArgumentException>(() => new VideoJSPlayerWidget().Width(string.Empty));

      var widget = new VideoJSPlayerWidget();
      Assert.Null(widget.Width());
      Assert.True(ReferenceEquals(widget.Width("width"), widget));
      Assert.Equal("width", widget.Width());
    }
Beispiel #7
0
        public void Height_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new VideoJSPlayerWidget().Height(null));
            Assert.Throws <ArgumentException>(() => new VideoJSPlayerWidget().Height(string.Empty));

            var widget = new VideoJSPlayerWidget();

            Assert.Null(widget.Height());
            Assert.True(ReferenceEquals(widget.Height("height"), widget));
            Assert.Equal("height", widget.Height());
        }
Beispiel #8
0
        public void Width_Method()
        {
            Assert.Throws <ArgumentNullException>(() => new VideoJSPlayerWidget().Width(null));
            Assert.Throws <ArgumentException>(() => new VideoJSPlayerWidget().Width(string.Empty));

            var widget = new VideoJSPlayerWidget();

            Assert.Null(widget.Width());
            Assert.True(ReferenceEquals(widget.Width("width"), widget));
            Assert.Equal("width", widget.Width());
        }