Exemple #1
0
        public void Build_InvalidConfiguration_ExceptionThrown()
        {
            var builder = new TestConsumerEndpointBuilder();

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

            act.Should().ThrowExactly <EndpointConfigurationException>();
        }
Exemple #2
0
        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);
        }