Exemplo n.º 1
0
        //[TestCase(ExecutionMode.Async, "async")]
        public void Can_set_execution_mode(ExecutionMode mode, string expected)
        {
            var request = new AnalyticsRequest(_defaultstatement);

            var formValues = request.GetFormValues();

            Assert.IsFalse(formValues.ContainsKey("mode"));

            request.ExecutionMode(mode);
            formValues = request.GetFormValues();

            if (mode == ExecutionMode.Immediate)
            {
                Assert.IsFalse(formValues.ContainsKey("mode"));
            }
            else
            {
                Assert.AreEqual(expected, formValues["mode"]);
            }
        }