public void Constructor_TryFindCertificateFails_ThrowsFatalErrorException()
        {
            // setup
            _certificateHelperMock = new Mock <ICertificateHelper>();
            _certificateHelperMock.Setup(c => c.TryFindCertificate(It.IsAny <string>()))
            .Returns(new CertificateResult()
            {
                Success = false
            });

            // test
            _queueConnectionFactory = new FAC.QueueConnectionFactory(
                _connectionFactoryMock.Object,
                _queueWrapperConfigMock.Object,
                _certificateHelperMock.Object);
        }
        public void TestSetup()
        {
            _connectionFactoryMock = new Mock <ConnectionFactory>();
            _connection            = new Mock <IConnection>();
            _model = new Mock <IModel>();
            _queueWrapperConfigMock = new Mock <IQueueConfiguration>().InitialiseMock();
            _certificateHelperMock  = new Mock <ICertificateHelper>();

            _connectionFactoryMock.Setup(c => c.CreateConnection())
            .Returns(_connection.Object);
            _certificateHelperMock.Setup(c => c.TryFindCertificate(It.IsAny <string>()))
            .Returns(new CertificateResult()
            {
                Success = true, Certificates = x509Certificate2Collection
            });

            _queueConnectionFactory = new FAC.QueueConnectionFactory(
                _connectionFactoryMock.Object,
                _queueWrapperConfigMock.Object,
                _certificateHelperMock.Object);
        }