public void ApiPicturesController_Index() { //Arrange var picturesRepo = new FakeRepository <Picture>(e => e.PictureID); picturesRepo.Create(new Picture() { PictureID = 1, OwnerID = "OwnerID", Name = "Testing", Hash = "Testing", ThumbnailData = TEST_BMP }); //Act var controller = new PicturesController(picturesRepo); var result = controller.GetPictures() as IEnumerable <PictureApi>; //Assert Assert.IsNotNull(result); Assert.IsNotNull(result.ToList()); Assert.IsTrue(result.ToList().Count() > 0); }