Beispiel #1
0
        public void GetApplicationOptionsAlphabeticalListForCentre_calls_data_service()
        {
            // Given
            const int categoryId         = 1;
            const int centreId           = 1;
            var       applicationOptions = new List <ApplicationDetails>();

            A.CallTo(() => courseDataService.GetApplicationsAvailableToCentreByCategory(centreId, categoryId))
            .Returns(applicationOptions);

            // When
            var result = courseService.GetApplicationOptionsAlphabeticalListForCentre(centreId, categoryId);

            // Then
            using (new AssertionScope())
            {
                A.CallTo(() => courseDataService.GetApplicationsAvailableToCentreByCategory(centreId, categoryId))
                .MustHaveHappenedOnceExactly();
                result.Should().BeEquivalentTo(applicationOptions);
            }
        }