public void PreviewCertificate_returns_not_found_when_service_returns_null()
        {
            // Given
            A.CallTo(() => certificateService.GetPreviewCertificateForCentre(A <int> ._)).Returns(null);

            // When
            var result = controller.PreviewCertificate();

            // Then
            result.Should().BeNotFoundResult();
        }
Exemplo n.º 2
0
        public void GetPreviewCertificateForCentre_returns_null_when_data_service_returns_null()
        {
            // Given
            const int centreId = 2;

            A.CallTo(() => centresDataService.GetCentreDetailsById(centreId)).Returns(null);

            // When
            var result = certificateService.GetPreviewCertificateForCentre(centreId);

            // Then
            result.Should().BeNull();
        }