public void Action_PhotosReturnsTwoPhotosTypeOfPhotoViewModel() { var result = _photosController._Photos(1) as PartialViewResult; Assert.IsNotNull(result); Assert.IsInstanceOfType(result.ViewData.Model, typeof(IEnumerable <PhotoViewModel>)); var photos = (List <PhotoViewModel>)result.ViewData.Model; Assert.AreEqual(2, photos.Count()); Assert.AreEqual("New1", photos[0].PhotoTitle); Assert.AreEqual("New2", photos[1].PhotoTitle); }