public void index_get_all() { var controller = new SystemController(_repository); _repository.Add(new Domain.Entities.System() { SystemId = 1, Name = "App 1" }); _repository.Add(new Domain.Entities.System() { SystemId = 2, Name = "App 2" }); var result = controller.Index(); result.Should().BeViewResult().ModelAs <IEnumerable <Domain.Entities.System> >().Should().HaveCount(2); }