public void CallBatch_UnmatchedCount_ExceptionPassedAndEmptyReturn()
            {
                BrokerContext.Initialize(CprBroker.Utilities.Constants.BaseApplicationToken.ToString(), "");
                var facade = new CallSingle.FacadeStub();

                CallSingle.FacadeStub.Element[] ret;
                var prov = new CallSingle.FacadeStub.ProviderStub()
                {
                    _GetBatch = (s) => new string[] { "SSS" }
                };
                var elements = new CallSingle.FacadeStub.ElementStub[] {
                    new CallSingle.FacadeStub.ElementStub()
                    {
                        Input = "DDD", Succeeded = true, Updatable = true
                    },
                    new CallSingle.FacadeStub.ElementStub()
                    {
                        Input = "SSS", Succeeded = true, Updatable = true
                    }
                };

                facade.CallBatch(prov, elements, out ret);
                Assert.NotNull(ret);
                Assert.IsEmpty(ret);
            }
            public void CallBatch_NormalSuccess_CorrectOutputUpdate()
            {
                var facade = new CallSingle.FacadeStub();

                CallSingle.FacadeStub.Element[] ret;
                var prov     = new CallSingle.FacadeStub.ProviderStub();
                var elements = new CallSingle.FacadeStub.ElementStub[] {
                    new CallSingle.FacadeStub.ElementStub()
                    {
                        Input = "DDD", Succeeded = true, Updatable = true
                    },
                    new CallSingle.FacadeStub.ElementStub()
                    {
                        Input = "SSS", Succeeded = true, Updatable = true
                    }
                };

                facade.CallBatch(prov, elements, out ret);
                Assert.AreEqual(2, ret.Length);

                Assert.AreEqual("DDD", ret[0].Input);
                Assert.AreEqual("DDD", ret[0].Output);

                Assert.AreEqual("SSS", ret[1].Input);
                Assert.AreEqual("SSS", ret[1].Output);
            }
            public void CallBatch_MixedSuccess_Correct()
            {
                BrokerContext.Initialize(CprBroker.Utilities.Constants.BaseApplicationToken.ToString(), "");
                var facade = new CallSingle.FacadeStub();

                CallSingle.FacadeStub.Element[] ret;
                var prov     = new CallSingle.FacadeStub.ProviderStub();
                var elements = new CallSingle.FacadeStub.ElementStub[] {
                    new CallSingle.FacadeStub.ElementStub()
                    {
                        Input = "DDD", Succeeded = false, Updatable = false
                    },
                    new CallSingle.FacadeStub.ElementStub()
                    {
                        Input = "SSS", Succeeded = true, Updatable = true
                    }
                };

                facade.CallBatch(prov, elements, out ret);
                Assert.AreEqual(1, ret.Length);
            }