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(); }
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(); }