public IActionResult Index()
        {
            var centres   = centresService.GetAllCentreSummariesForSuperAdmin();
            var viewModel = new CentresViewModel(centres);

            return(View(viewModel));
        }
Пример #2
0
        public void GetAllCentreSummariesForSuperAdmin_calls_dataService_and_returns_all_summary_details()
        {
            // Given
            var centres = Builder <CentreSummaryForSuperAdmin> .CreateListOfSize(10).Build();

            A.CallTo(() => centresDataService.GetAllCentreSummariesForSuperAdmin()).Returns(centres);

            // When
            var result = centresService.GetAllCentreSummariesForSuperAdmin();

            // Then
            result.Should().HaveCount(10);
        }