public void ImageList_Returns_List_Of_ImageList()
        {
            var mockedImageReferenceRepository = GetMockedImageReferenceRepositoryWith4Images();
            var controller = new ImageController(mockedImageReferenceRepository.Object, new Mock<IJumbleblocksLogger>().Object);

            var result = (JsonResult)controller.ImageList(0, 4);
            result.Data.ShouldBeInstanceOfType(typeof(ImageList));
        }
        public void ImageList_Returns_ImageList_Of_ImageListItem_Representing_ImageReferences()
        {
            var mockedImageReferenceRepository = GetMockedImageReferenceRepositoryWith4Images();
            var imageReferenceRepository = mockedImageReferenceRepository.Object;

            var allImages = imageReferenceRepository.LoadRange(0, 4).ToArray();

            var controller = new ImageController(mockedImageReferenceRepository.Object, new Mock<IJumbleblocksLogger>().Object);

            var result = (JsonResult)controller.ImageList(0, 4);
            var imageListViewModel = (ImageList)result.Data;

            imageListViewModel.ImageViewModels.ShouldContain(new ImageListItem { Id = allImages[0].Id.Value, Url = allImages[0].Url }, "Does not contain expected image url '{0}'", allImages[0].Url);
            imageListViewModel.ImageViewModels.ShouldContain(new ImageListItem { Id = allImages[1].Id.Value, Url = allImages[1].Url }, "Does not contain expected image url '{0}'", allImages[1].Url);
            imageListViewModel.ImageViewModels.ShouldContain(new ImageListItem { Id = allImages[2].Id.Value, Url = allImages[2].Url }, "Does not contain expected image url '{0}'", allImages[2].Url);
            imageListViewModel.ImageViewModels.ShouldContain(new ImageListItem { Id = allImages[3].Id.Value, Url = allImages[3].Url }, "Does not contain expected image url '{0}'", allImages[3].Url);
        }