public void SettlementEnquiryRequest_OnValidRequestWithOptions_ReturnObjects()
        {
            // arrange
            const string posRefId = "test";
            const string merchantReceiptHeader = "";
            const string merchantReceiptFooter = "merchantfooter";
            const string customerReceiptHeader = "customerheader";
            const string customerReceiptFooter = "";

            var options = new TransactionOptions();

            options.SetMerchantReceiptFooter(merchantReceiptFooter);
            options.SetCustomerReceiptHeader(customerReceiptHeader);

            // act
            var request = new SettlementEnquiryRequest(posRefId);

            request.Options = options;
            var msg = request.ToMessage();

            // assert
            Assert.Equal(merchantReceiptHeader, msg.GetDataStringValue("merchant_receipt_header"));
            Assert.Equal(merchantReceiptFooter, msg.GetDataStringValue("merchant_receipt_footer"));
            Assert.Equal(customerReceiptHeader, msg.GetDataStringValue("customer_receipt_header"));
            Assert.Equal(customerReceiptFooter, msg.GetDataStringValue("customer_receipt_footer"));
        }
        public void SettlementEnquiryRequest_OnValidRequest_ReturnObjects()
        {
            // arrange
            const string posRefId = "test";

            // act
            var request = new SettlementEnquiryRequest(posRefId);
            var msg     = request.ToMessage();

            // assert
            Assert.Equal("settlement_enquiry", msg.EventName);
            Assert.Equal(posRefId, request.Id);
        }
        public void SettlementEnquiryRequest_OnValidRequestWithOptionsNone_ReturnObjects()
        {
            // arrange
            const string posRefId = "test";

            // act
            var request = new SettlementEnquiryRequest(posRefId);
            var msg     = request.ToMessage();

            // assert
            Assert.Equal("", msg.GetDataStringValue("merchant_receipt_header"));
            Assert.Equal("", msg.GetDataStringValue("merchant_receipt_footer"));
            Assert.Equal("", msg.GetDataStringValue("customer_receipt_header"));
            Assert.Equal("", msg.GetDataStringValue("customer_receipt_footer"));
        }
        public void SettlementEnquiryRequest_OnValidRequestWithConfig_ReturnObjects()
        {
            // arrange
            const string posRefId = "test";

            var config = new SpiConfig();

            config.PrintMerchantCopy             = true;
            config.PromptForCustomerCopyOnEftpos = true;
            config.SignatureFlowOnEftpos         = false;

            // act
            var request = new SettlementEnquiryRequest(posRefId);

            request.Config = config;
            var msg = request.ToMessage();

            // assert
            Assert.True(msg.GetDataBoolValue("print_merchant_copy", false));
            Assert.False(msg.GetDataBoolValue("prompt_for_customer_copy", false));
            Assert.False(msg.GetDataBoolValue("print_for_signature_required_transactions", false));
        }