public void ActivateReversal()
        {
            activateReversal reversal = new activateReversal();

            reversal.id                 = "1";
            reversal.reportGroup        = "planets";
            reversal.litleTxnId         = 123456000;
            reversal.virtualGiftCardBin = "123";
            giftCardCardType card = new giftCardCardType();

            card.type                       = methodOfPaymentTypeEnum.GC;
            card.number                     = "414100000000000000";
            card.expDate                    = "1210";
            card.pin                        = "1234";
            reversal.card                   = card;
            reversal.originalRefCode        = "123";
            reversal.originalAmount         = 123;
            reversal.originalTxnTime        = new DateTime(2017, 01, 01);
            reversal.originalSystemTraceId  = 123;
            reversal.originalSequenceNumber = "123456";
            var mock = new Mock <Communications>();

            mock.Setup(Communications => Communications.HttpPost(It.IsRegex(".*<litleTxnId>123456000</litleTxnId>\r\n<virtualGiftCardBin>123</virtualGiftCardBin>\r\n<card>\r\n<type>GC</type>\r\n<number>414100000000000000</number>\r\n<expDate>1210</expDate>\r\n<pin>1234</pin>\r\n</card>\r\n<originalRefCode>123</originalRefCode>\r\n<originalAmount>123</originalAmount>\r\n<originalTxnTime>2017-01-01T00:00:00Z</originalTxnTime>\r\n<originalSystemTraceId>123</originalSystemTraceId>\r\n<originalSequenceNumber>123456</originalSequenceNumber>.*", RegexOptions.Singleline), It.IsAny <Dictionary <String, String> >()))
            .Returns("<litleOnlineResponse version='8.14' response='0' message='Valid Format' xmlns='http://www.litle.com/schema'><authReversalResponse><litleTxnId>123</litleTxnId></authReversalResponse></litleOnlineResponse>");

            Communications mockedCommunication = mock.Object;

            litle.setCommunication(mockedCommunication);
            litle.ActivateReversal(reversal);
        }
        public void ActivateReversal()
        {
            var reversal = new activateReversal
            {
                id                 = "1",
                reportGroup        = "planets",
                litleTxnId         = 123456000,
                virtualGiftCardBin = "123",
                card               = new giftCardCardType
                {
                    type    = methodOfPaymentTypeEnum.GC,
                    number  = "414100000000000000",
                    expDate = "1210",
                    pin     = "1234"
                },
                originalRefCode        = "123",
                originalAmount         = 123,
                originalTxnTime        = DateTime.Now,
                originalSystemTraceId  = 123,
                originalSequenceNumber = "123456"
            };

            var response = _litle.ActivateReversal(reversal);

            Assert.AreEqual("Approved", response.message);
        }
        public void TestSimple()
        {
            activateReversal activateReversal = new activateReversal();

            activateReversal.id          = "a";
            activateReversal.reportGroup = "b";
            activateReversal.litleTxnId  = "123";

            var mock = new Mock <Communications>();

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

            Communications mockedCommunication = mock.Object;

            litle.setCommunication(mockedCommunication);
            activateReversalResponse response = litle.ActivateReversal(activateReversal);

            Assert.AreEqual("123", response.litleTxnId);
        }