コード例 #1
0
 public void GetImageUrlShouldReturnCorrectUrlWithNoSizeGiven()
 {
     const string fileName = "pesho";
     IMediaImageUrlProvider mediaImageUrlProvider = new MediaImageUrlProvider();
     var actual = mediaImageUrlProvider.GetImageUrl(fileName, null);
     Assert.AreEqual("/" + WebApplicationConstants.ImageRouteUrl + "/pesho", actual);
 }
コード例 #2
0
        public void GetImageUrlShouldReturnCorrectUrlWithSize()
        {
            const string fileName = "pesho";
            const int size = 250;

            IMediaImageUrlProvider mediaImageUrlProvider = new MediaImageUrlProvider();
            var actual = mediaImageUrlProvider.GetImageUrl(fileName, size);
            Assert.AreEqual("/" + WebApplicationConstants.ImageRouteUrl + "/pesho/" + size, actual);
        }