Exemple #1
0
        public void GetThumbnailSizeNegative()
        {
            var exception = Assert.Throws <ArgumentOutOfRangeException>(() => ThumbnailUrlHelper.GetThumbnailUrl(1, null, null, -1));

            Assert.Equal("size", exception.ParamName);
            Assert.Equal(-1f, exception.ActualValue);
            Assert.Equal("Can't be a negative number\r\nParameter name: size\r\nActual value was -1.", exception.Message);
        }
Exemple #2
0
 /// <inheritdoc />
 public string GetThumbnailUrl(int booliId, int width, int height)
 {
     return(ThumbnailUrlHelper.GetThumbnailUrl(booliId, width, height));
 }
Exemple #3
0
 /// <inheritdoc />
 public string GetThumbnailUrl(int booliId, float size)
 {
     return(ThumbnailUrlHelper.GetThumbnailUrl(booliId, size: size));
 }
Exemple #4
0
 /// <inheritdoc />
 public string GetThumbnailUrl(int booliId)
 {
     return(ThumbnailUrlHelper.GetThumbnailUrl(booliId));
 }
Exemple #5
0
        public void GetThumbnail(int booliId, int?width, int?height, float?size, string expected)
        {
            var actual = ThumbnailUrlHelper.GetThumbnailUrl(booliId, width, height, size);

            Assert.Equal(expected, actual);
        }