Ejemplo n.º 1
0
        public void SummaryReportEnabled_OnValidRequest_IsSet()
        {
            // arrange
            var config = new PayAtTableConfig();

            config.SummaryReportEnabled = true;

            // act
            var msg = config.ToMessage("111");

            // assert
            Assert.Equal(config.SummaryReportEnabled, msg.GetDataBoolValue("summary_report_enabled", false));
        }
Ejemplo n.º 2
0
        public void TippingEnabled_OnValidRequest_IsSet()
        {
            // arrange
            var config = new PayAtTableConfig();

            config.TippingEnabled = true;

            // act
            var msg = config.ToMessage("111");

            // assert
            Assert.Equal(config.TippingEnabled, msg.GetDataBoolValue("tipping_enabled", false));
        }
Ejemplo n.º 3
0
        public void SplitByAmountEnabled_OnValidRequest_IsSet()
        {
            // arrange
            var config = new PayAtTableConfig();

            config.SplitByAmountEnabled = true;

            // act
            var msg = config.ToMessage("111");

            // assert
            Assert.Equal(config.SplitByAmountEnabled, msg.GetDataBoolValue("split_by_amount_enabled", false));
        }
Ejemplo n.º 4
0
        public void LabelTableId_OnValidRequest_IsSet()
        {
            // arrange
            var config = new PayAtTableConfig();

            config.LabelTableId = "12";

            // act
            var msg = config.ToMessage("111");

            // assert
            Assert.Equal(config.LabelTableId, msg.GetDataStringValue("table_id_label"));
        }
Ejemplo n.º 5
0
        public void LabelPayButton_OnValidRequest_IsSet()
        {
            // arrange
            var config = new PayAtTableConfig();

            config.LabelPayButton = "PAT";

            // act
            var msg = config.ToMessage("111");

            // assert
            Assert.Equal(config.LabelPayButton, msg.GetDataStringValue("pay_button_label"));
        }
Ejemplo n.º 6
0
        public void AllowedOperatorIds_OnValidRequest_IsSet()
        {
            // arrange
            var config = new PayAtTableConfig();
            var allowedOperatorIdList = new List <string>();

            allowedOperatorIdList.Add("1");
            allowedOperatorIdList.Add("2");
            config.AllowedOperatorIds = allowedOperatorIdList;

            // act
            var msg             = config.ToMessage("111");
            var operatorIdArray = (JArray)msg.Data["operator_id_list"];
            var operatorIdList  = operatorIdArray.ToObject <IList <string> >();

            // assert
            Assert.Equal(config.AllowedOperatorIds, operatorIdList);
            Assert.Equal(config.AllowedOperatorIds.Count, 2);
        }