public ConsentNotificationControllerTest() { consentRepository = new Mock <IConsentRepository>(); backgroundJobClient = new Mock <IBackgroundJobClient>(); gatewayClient = new Mock <GatewayClient>(MockBehavior.Strict, null, null); consentNotificationController = new ConsentNotificationController(consentRepository.Object, backgroundJobClient.Object, gatewayClient.Object); SetupConsentNotification(ConsentStatus.GRANTED); verifyActualConsentEqualsExpected = (actual) => { var expected = consentNotification.Notification; return(actual.ConsentArtefactId == expected.ConsentDetail.ConsentId && actual.ConsentArtefact == expected.ConsentDetail && actual.Signature == expected.Signature && actual.Status == expected.Status && actual.ConsentManagerId == expected.ConsentId); }; gatewayClient .Setup(g => g.SendDataToGateway( It.IsAny <string>(), It.IsAny <GatewayRevokedConsentRepresentation>(), It.IsAny <string>())) .Returns(Task.Run(() => { })); }
public ConsentNotificationControllerTest() { consentRepository = new Mock <IConsentRepository>(); backgroundJobClient = new Mock <IBackgroundJobClient>(); var gatewayClient = new Mock <GatewayClient>(MockBehavior.Strict, null, null); consentNotificationController = new ConsentNotificationController(consentRepository.Object, backgroundJobClient.Object, gatewayClient.Object); }