public void simpleEcheckRedeposit()
        {
            var echeckredeposit = new echeckRedeposit();

            echeckredeposit.litleTxnId = 123456;
            var response = litle.EcheckRedeposit(echeckredeposit);

            Assert.AreEqual("Approved", response.message);
        }
        public void simpleEcheckRedeposit()
        {
            var echeckredeposit = new echeckRedeposit
            {
                id          = "1",
                reportGroup = "Planets",
                litleTxnId  = 123456
            };

            var response = _litle.EcheckRedeposit(echeckredeposit);

            Assert.AreEqual("Approved", response.message);
        }
Beispiel #3
0
        public void TestMerchantData()
        {
            var echeckRedeposit = new echeckRedeposit();

            echeckRedeposit.litleTxnId                      = 1;
            echeckRedeposit.merchantData                    = new merchantDataType();
            echeckRedeposit.merchantData.campaign           = "camp";
            echeckRedeposit.merchantData.affiliate          = "affil";
            echeckRedeposit.merchantData.merchantGroupingId = "mgi";

            var mock = new Mock <Communications>(_memoryStreams);

            mock.Setup(
                Communications =>
                Communications.HttpPost(
                    It.IsRegex(
                        ".*<echeckRedeposit.*<litleTxnId>1</litleTxnId>.*<merchantData>.*<campaign>camp</campaign>.*<affiliate>affil</affiliate>.*<merchantGroupingId>mgi</merchantGroupingId>.*</merchantData>.*",
                        RegexOptions.Singleline), It.IsAny <Dictionary <string, string> >()))
            .Returns(
                "<litleOnlineResponse version='8.13' response='0' message='Valid Format' xmlns='http://www.litle.com/schema'><echeckRedepositResponse><litleTxnId>123</litleTxnId></echeckRedepositResponse></litleOnlineResponse>");

            var mockedCommunication = mock.Object;

            litle.setCommunication(mockedCommunication);
            litle.EcheckRedeposit(echeckRedeposit);
        }
Beispiel #4
0
        public void testEcheckRedeposit()
        {
            echeckRedeposit echeckredeposit = new echeckRedeposit();

            echeckredeposit.litleTxnId = 123456;

            var mock = new Mock <Communications>();

            mock.Setup(Communications => Communications.HttpPost(It.IsRegex(".*?<litleOnlineRequest.*?<echeckRedeposit.*?<litleTxnId>123456</litleTxnId>.*?</echeckRedeposit>.*?", RegexOptions.Singleline), It.IsAny <Dictionary <String, String> >()))
            .Returns("<litleOnlineResponse version='8.10' response='0' message='Valid Format' xmlns='http://www.litle.com/schema'><echeckRedepositResponse><litleTxnId>123</litleTxnId></echeckRedepositResponse></litleOnlineResponse>");

            Communications mockedCommunication = mock.Object;

            litle.setCommunication(mockedCommunication);
            echeckRedepositResponse echeckredepositresponse = litle.EcheckRedeposit(echeckredeposit);

            Assert.AreEqual(123, echeckredepositresponse.litleTxnId);
        }