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