Exemplo n.º 1
0
        public void Build_InvalidConfiguration_ExceptionThrown()
        {
            var builder = new TestProducerEndpointBuilder();

            Action act = () => builder.Encrypt(new SymmetricEncryptionSettings()).Build();

            act.Should().ThrowExactly <EndpointConfigurationException>();
        }
Exemplo n.º 2
0
        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);
        }