Ejemplo n.º 1
0
        public ActionResult PictureThumb(int id = invalidId)
        {
            if (id == invalidId)
            {
                return(NoId());
            }

            var artist = queries.GetPictureThumb(id);

            return(Picture(artist));
        }
Ejemplo n.º 2
0
        public void GetCoverPictureThumb()
        {
            var contract = CallUpdate(ResourceHelper.TestImage());

            contract.PictureMime = "image/jpeg";

            var result = queries.GetPictureThumb(contract.Id);

            Assert.IsNotNull(result, "result");
            Assert.IsNotNull(result.Picture, "Picture");
            Assert.IsNotNull(result.Picture.Bytes, "Picture content");
            Assert.AreEqual(contract.PictureMime, result.Picture.Mime, "Picture MIME");
            Assert.AreEqual(contract.Id, result.EntryId, "EntryId");
        }
Ejemplo n.º 3
0
        public async Task GetCoverPictureThumb()
        {
            var contract = await CallUpdate(ResourceHelper.TestImage());

            contract.PictureMime = "image/jpeg";

            var result = _queries.GetPictureThumb(contract.Id);

            result.Should().NotBeNull("result");
            result.Picture.Should().NotBeNull("Picture");
            result.Picture.Bytes.Should().NotBeNull("Picture content");
            result.Picture.Mime.Should().Be(contract.PictureMime, "Picture MIME");
            result.EntryId.Should().Be(contract.Id, "EntryId");
        }