private ActorViewModel CreateActorViewModel(int i) { IImageViewModel image = Substitute.For <IImageViewModel>(); ActorViewModel actor = new ActorViewModel(image); actor.Initialize("ActorName" + i, "ActorRole" + i); actor.ThumbUrl = "ActorThumb" + i; return(actor); }
private IEnumerable <IActorViewModel> TransformActors(IEnumerable <ActorMetadata> actors) { foreach (ActorMetadata actor in actors) { ActorViewModel actorViewModel = new ActorViewModel(_viewModelFactory.GetImage(true)); actorViewModel.Initialize(actor.Name, actor.Role); actorViewModel.ThumbUrl = actor.Thumb; actorViewModel.ThumbPath.Path = actor.ThumbPath; yield return(actorViewModel); } }