Ejemplo n.º 1
0
            public void ShouldCreateDefaultTrustManagerIfEncrypted()
            {
                var encryption =
                    EncryptionManager.CreateFromConfig(EncryptionLevel.Encrypted, null, null);

                encryption.UseTls.Should().BeTrue();
                encryption.TrustManager.Should().NotBeNull().And.BeOfType <ChainTrustManager>();
            }
Ejemplo n.º 2
0
            public void ShouldUseProvidedTrustManager()
            {
                var encryption =
                    EncryptionManager.CreateFromConfig(null, new CustomTrustManager(), null);

                encryption.UseTls.Should().BeFalse();
                encryption.TrustManager.Should().NotBeNull().And.BeOfType <CustomTrustManager>();
            }
Ejemplo n.º 3
0
            public void ShouldNotCreateTrustManagerIfEncryptedIsNull()
            {
                var encryption =
                    EncryptionManager.CreateFromConfig(null, null, null);

                encryption.UseTls.Should().BeFalse();
                encryption.TrustManager.Should().BeNull();
            }