AskAttribution() public method

public AskAttribution ( ) : void
return void
コード例 #1
0
        private void CheckAttributionState()
        {
            // if it's a new session
            if (ActivityState.SubSessionCount <= 1)
            {
                return;
            }

            // if there is already an attribution saved and there was no attribution being asked
            if (Attribution != null && !ActivityState.AskingAttribution)
            {
                return;
            }

            AttributionHandler.AskAttribution();
        }
コード例 #2
0
        private void StartGetAttributionTest(AttributionHandler attributionHandler, ResponseType responseType)
        {
            MockHttpMessageHandler.ResponseType = responseType;

            attributionHandler.AskAttribution();

            DeviceUtil.Sleep(1000);

            RequestTest(MockHttpMessageHandler.HttpRequestMessage);

            Assert.Test("HttpMessageHandler SendAsync");
        }
コード例 #3
0
        public void TestWithoutListener()
        {
            AttributionHandler attributionHandler = new AttributionHandler(
                activityHandler: MockActivityHandler,
                attributionPackage: AttributionPackage,
                startPaused: false,
                hasDelegate: false);

            MockHttpMessageHandler.ResponseType = ResponseType.MESSAGE;

            attributionHandler.AskAttribution();

            DeviceUtil.Sleep(1000);

            // check that the activity handler is not paused
            Assert.NotDebug("Attribution handler is paused");

            // but it did not call the http client
            Assert.Null(MockHttpMessageHandler.HttpRequestMessage);

            Assert.NotTest("HttpMessageHandler SendAsync");
        }