Exemplo n.º 1
0
        public void GetNumberOfPictures()
        {
            IPictureService   pictureService    = new MockPictureService();
            PictureController pictureController = new PictureController(pictureService);
            var result = pictureController.GetPictures();

            Assert.NotNull(result);
        }
Exemplo n.º 2
0
        public async Task Controller_Should_Return_Status_404NotFound()
        {
            IPictureService   pictureService    = new MockPictureService();
            PictureController pictureController = new PictureController(pictureService);
            var id       = new Guid("1ba6b939-2a1a-4d6d-b65a-33f699a82bdb");
            var response = await pictureController.GetPicture(id);

            Assert.NotNull(response);
        }
Exemplo n.º 3
0
        public PageViewModel()
        {
            Pictures = new ObservableCollection <Picture>();

            _mockPictureService = new MockPictureService();

            IEnumerable <Picture> localPictues = _mockPictureService.GetAll();

            foreach (Picture picture in localPictues)
            {
                Pictures.Add(picture);
            }
        }