Example #1
0
        public void EncodeOfferUpdate()
        {
            URLEncoder urlEncoder = new URLEncoder();

            Offer offer = new Offer();

            offer.Name = "Oferta 48";
            offer.Id   = "offer_6eea405f83d4d3098604";

            string expected = "amount=0&interval=week&name=Oferta+48";
            string reply    = urlEncoder.EncodeOfferAdd(offer);

            Assert.AreEqual(expected, reply);
        }
Example #2
0
        public void EncodeOfferAdd()
        {
            URLEncoder urlEncoder = new URLEncoder();

            Offer offer = new Offer();

            offer.Amount            = 1500;
            offer.Currency          = "eur";
            offer.Interval          = Offer.TypeInterval.MONTH;
            offer.Name              = "Prueba API";
            offer.Trial_Period_Days = 3;

            string expected = "amount=1500&currency=eur&interval=month&name=Prueba+API";
            string reply    = urlEncoder.EncodeOfferAdd(offer);

            Assert.AreEqual(expected, reply);
        }
        public void EncodeOfferAdd()
        {
            URLEncoder urlEncoder = new URLEncoder();

            Offer offer = new Offer();
            offer.Amount = 1500;
            offer.Currency = "eur";
            offer.Interval = Offer.TypeInterval.MONTH;
            offer.Name = "Prueba API";
            offer.Trial_Period_Days = 3;

            string expected = "amount=1500&currency=eur&interval=month&name=Prueba+API";
            string reply = urlEncoder.EncodeOfferAdd(offer);

            Assert.AreEqual(expected, reply);
        }
        public void EncodeOfferUpdate()
        {
            URLEncoder urlEncoder = new URLEncoder();

            Offer offer = new Offer();
            offer.Name = "Oferta 48";
            offer.Id = "offer_6eea405f83d4d3098604";

            string expected = "amount=0&interval=week&name=Oferta+48";
            string reply = urlEncoder.EncodeOfferAdd(offer);

            Assert.AreEqual(expected, reply);
        }