public void TearDown()
        {
            this.sessionConfig = null;

            this.interactionUrlBuilder = null;
            this.eventUrlBuilder       = null;
        }
Exemplo n.º 2
0
        public async Task <UTResponse> TrackInteractionAsync(ITrackInteractionRequest request, CancellationToken cancelToken)
        {
            BaseValidator.CheckNullAndThrow(request, this.GetType().Name + ".request");

            ITrackInteractionRequest requestCopy = request.DeepCopyTrackInteractionRequest();

            ITrackInteractionRequest autocompletedRequest = this.requestMerger.FillTrackInteractionGaps(requestCopy);

            var urlBuilder = new TrackInteractionUrlBuilder <ITrackInteractionRequest>(this.utGrammar);
            var taskFlow   = new TrackInteractionTask(urlBuilder, this.httpClient);

            var response = await RestApiCallFlow.LoadRequestFromNetworkFlow(autocompletedRequest, taskFlow, cancelToken);

            if (response.Successful)
            {
                //@igk order matters
                this.sessionConfig = new UTSessionConfig(this.sessionConfig.InstanceUrl, response.Description);
                this.requestMerger = new UserRequestMerger(this.sessionConfig, this.defaultDeviceIdentifier);
            }

            return(response);
        }
 public TrackInteractionTask(
     TrackInteractionUrlBuilder <ITrackInteractionRequest> trackInteractionUrlBuilder,
     HttpClient httpClient) : base(trackInteractionUrlBuilder, httpClient)
 {
 }
 public void Setup()
 {
     this.sessionConfig         = new UTSessionConfig(TestEndpointsConfig.InstanceUrl);
     this.interactionUrlBuilder = new TrackInteractionUrlBuilder <ITrackInteractionRequest>(UTGrammar.UTV1Grammar());
     this.eventUrlBuilder       = new TrackEventUrlBuilder <ITrackEventRequest>(UTGrammar.UTV1Grammar());
 }