Beispiel #1
0
        public void RenderMessage_AddsPromoViewWithOptional()
        {
            var subj            = new PromoViewMeasurement(new[] { new PromoFieldObject("JUNE_PROMO13", "June Sale", creative: "banner1", position: "slot1") });
            var renderedMessage = subj.RenderMessage();

            Assert.That(renderedMessage, Is.StringContaining("{'event': 'promoView','ecommerce': {'promoView': {'promotions': [{'id': 'JUNE_PROMO13','name': 'June Sale','creative': 'banner1','position': 'slot1'}]}}}"));
        }
Beispiel #2
0
        public void RenderMessage_AddsPromoView()
        {
            var subj            = new PromoViewMeasurement(new[] { new PromoFieldObject("JUNE_PROMO13", "June Sale") });
            var renderedMessage = subj.RenderMessage();

            Assert.That(renderedMessage, Is.StringContaining("{'event': 'promoView','ecommerce': {'promoView': {'promotions': [{'id': 'JUNE_PROMO13','name': 'June Sale'}]}}}"));
        }