public void ShouldReturnProjectStatuses() { var statuses = new List <ProjectStatus>() { new ProjectStatus() { Id = 1, Name = "open" }, new ProjectStatus() { Id = 2, Name = "closed" } }; var config = new MapperConfiguration(cfg => { cfg.AddProfile(new MappingProfile()); }); var mapper = config.CreateMapper(); var destRepo = new Mock <IDestinationRepository>(); destRepo.Setup(d => d.GetProjectStatuses()).Returns(statuses.AsQueryable()); var destServ = new DestinationService(destRepo.Object, mapper); var resultList = destServ.GetProjectStatuses(); resultList.Should().NotBeNullOrEmpty(); resultList.Should().AllBeOfType(typeof(ProjectStatusVm)); resultList.Should().HaveCount(2); resultList.Should().OnlyHaveUniqueItems(ps => ps.Id); }