Beispiel #1
0
            public void ShouldCreateDefaultTrustManagerIfEncrypted()
            {
                var encryption =
                    EncryptionManager.CreateFromConfig(EncryptionLevel.Encrypted, null, null);

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

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

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