private static async Task <StepResult> ExerciseEncryption(MessagingContext message) { var sut = new EncryptAS4MessageStep(CreateStubCertificateRepository().Object); // Act return(await sut.ExecuteAsync(message)); }
public async Task ThenExecuteStepFailsWithInvalidCertificateAsync() { // Arrange Mock <ICertificateRepository> certificateRepositoryMock = CreateFailedMockedCertificateRepository(); _step = new EncryptAS4MessageStep(certificateRepositoryMock.Object); // Act / Assert await Assert.ThrowsAnyAsync <Exception>( () => _step.ExecuteAsync(CreateEncryptedAS4Message())); }