public void Build_InvalidConfiguration_ExceptionThrown() { var builder = new TestConsumerEndpointBuilder(); Action act = () => builder.Decrypt(new SymmetricEncryptionSettings()).Build(); act.Should().ThrowExactly <EndpointConfigurationException>(); }
public void Decrypt_EncryptionSettings_EncryptionSet() { var builder = new TestConsumerEndpointBuilder(); var encryptionSettings = new SymmetricEncryptionSettings { AlgorithmName = "TripleDES", Key = new byte[10] }; var endpoint = builder.Decrypt(encryptionSettings).Build(); endpoint.Encryption.Should().BeSameAs(encryptionSettings); }