public void ItDoesntAddTheNonInterationHitIfItIsFalse()
        {
            _analyticsEvent.Expect(mock => mock.NonInteractionHit)
            .Return(false)
            .Repeat.Any();
            string postData = _postDataBuilder.BuildPostDataString(string.Empty, _analyticsEvent);

            NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(postData);

            Assert.Null(nameValueCollection[PostDataBuilder.PARAMETER_KEY_NON_INTERACTION_HIT]);
        }
        public void ItDoesntAddTheEventLabelIfItIsNull()
        {
            analyticsEvent.Expect(mock => mock.EventLabel)
            .Return(null)
            .Repeat.Any();
            string postData = postDataBuilder.BuildPostDataString(string.Empty, analyticsEvent);

            NameValueCollection nameValueCollection = HttpUtility.ParseQueryString(postData);

            Assert.Null(nameValueCollection[PostDataBuilder.PARAMETER_KEY_EVENT_LABEL]);
        }
        public void SetUp()
        {
            _postDataBuilder = new PostDataBuilder();

            _analyticsEvent = MockRepository.GenerateMock <IUniversalAnalyticsEvent>();
            _analyticsEvent.Expect(mock => mock.TrackingId)
            .Return(_trackingId);
            _analyticsEvent.Expect(mock => mock.AnonymousClientId)
            .Return(_anonymousClientId);
            _analyticsEvent.Expect(mock => mock.EventAction)
            .Return(_eventAction);
            _analyticsEvent.Expect(mock => mock.EventCategory)
            .Return(_eventCategory);
            _analyticsEvent.Expect(mock => mock.EventLabel)
            .Return(_eventLabel);
            _analyticsEvent.Expect(mock => mock.EventValue)
            .Return(_eventValue);
            _analyticsEvent.Expect(m => m.UserId)
            .Return(_userId);
            _analyticsEvent.Expect(mock => mock.NonInteractionHit)
            .Return(_nonInteractionHit);
        }
        public void SetUp()
        {
            postDataBuilder = new PostDataBuilder();

            analyticsEvent = MockRepository.GenerateMock <IUniversalAnalyticsEvent>();
            analyticsEvent.Expect(mock => mock.TrackingId)
            .Return(trackingId);
            analyticsEvent.Expect(mock => mock.AnonymousClientId)
            .Return(anonymousClientId);
            analyticsEvent.Expect(mock => mock.EventAction)
            .Return(eventAction);
            analyticsEvent.Expect(mock => mock.EventCategory)
            .Return(eventCategory);
            analyticsEvent.Expect(mock => mock.EventLabel)
            .Return(eventLabel);
            analyticsEvent.Expect(mock => mock.EventValue)
            .Return(eventValue);
        }
        public void SetUp()
        {
            postDataBuilder = new PostDataBuilder();

            analyticsEvent = MockRepository.GenerateMock<IUniversalAnalyticsEvent>();
            analyticsEvent.Expect(mock => mock.TrackingId)
                .Return(trackingId);
            analyticsEvent.Expect(mock => mock.AnonymousClientId)
                .Return(anonymousClientId);
            analyticsEvent.Expect(mock => mock.EventAction)
                .Return(eventAction);
            analyticsEvent.Expect(mock => mock.EventCategory)
                .Return(eventCategory);
            analyticsEvent.Expect(mock => mock.EventLabel)
                .Return(eventLabel);
            analyticsEvent.Expect(mock => mock.EventValue)
                .Return(eventValue);
        }