Exemplo n.º 1
0
            public void Throws_exception_on_no_sender()
            {
                //Arrange
                var clientConfiguration = new ClientConfiguration(Environment.DifiQa, GetPostenTestCertificate());
                var client = new ClientStub(clientConfiguration);

                //Act
                Assert.Throws <SenderNotSpecifiedException>(() => client.GetCurrentSender(null));
            }
Exemplo n.º 2
0
            public void Returns_job_sender_if_only_set()
            {
                //Arrange
                var expected            = new Sender(BringPublicOrganizationNumber);
                var clientConfiguration = new ClientConfiguration(Environment.DifiQa, GetBringCertificate());
                var client = new ClientStub(clientConfiguration);

                //Act
                var actual = client.GetCurrentSender(expected);

                //Assert
                Assert.Equal(expected, actual);
            }
Exemplo n.º 3
0
            public void Can_disable_sender_certificate_validation()
            {
                //Arrange
                var sender = new Sender(BringPublicOrganizationNumber);
                var incorrectSenderCertificate = GetPostenTestCertificate();
                var clientConfiguration        = new ClientConfiguration(Environment.DifiQa, incorrectSenderCertificate)
                {
                    CertificateValidationPreferences = { ValidateSenderCertificate = false }
                };
                var client = new ClientStub(clientConfiguration);

                //Act
                var actual = client.GetCurrentSender(sender);

                //Assert
            }