public void ClearQueue_Clears_QueuedHits()
        {
            // setup
            int expectedSize = 3;

            latch = new CountdownEvent(1);
            var config = new Dictionary <string, Java.Lang.Object>();

            config.Add("analytics.batchLimit", 5);
            ACPCore.UpdateConfiguration(config);
            ACPCore.TrackAction("action", null);
            ACPCore.TrackAction("action", null);
            ACPCore.TrackAction("action", null);
            // test
            ACPAnalytics.GetQueueSize(new QueueSizeCallback());
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(retrievedQueueSize, Is.EqualTo(expectedSize));
            // test
            expectedSize = 0;
            ACPAnalytics.ClearQueue();
            latch = new CountdownEvent(1);
            ACPAnalytics.GetQueueSize(new QueueSizeCallback());
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(retrievedQueueSize, Is.EqualTo(expectedSize));
        }
Пример #2
0
 public TaskCompletionSource <string> ClearQueue()
 {
     stringOutput = new TaskCompletionSource <string>();
     ACPAnalytics.ClearQueue();
     stringOutput.SetResult("");
     return(stringOutput);
 }
 public void Setup()
 {
     retrievedQueueSize         = 0;
     retrievedVisitorIdentifier = "";
     latch = null;
     ACPAnalytics.ClearQueue();
     ACPCore.SetPrivacyStatus(MobilePrivacyStatus.OptIn);
 }
        public void ClearQueue_Clears_QueuedHits()
        {
            // setup
            var   latch     = new CountdownEvent(1);
            nuint queueSize = 0;
            var   config    = new NSMutableDictionary <NSString, NSObject>
            {
                ["analytics.batchLimit"] = new NSNumber(5)
            };

            ACPCore.UpdateConfiguration(config);
            ACPCore.TrackAction("action", null);
            ACPCore.TrackAction("action", null);
            ACPCore.TrackAction("action", null);
            // test
            ACPAnalytics.GetQueueSize(callback =>
            {
                queueSize = callback;
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(queueSize, Is.EqualTo(3));
            // test
            ACPAnalytics.ClearQueue();
            latch = new CountdownEvent(1);
            ACPAnalytics.GetQueueSize(callback =>
            {
                queueSize = callback;
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(queueSize, Is.EqualTo(0));
        }
 public void Setup()
 {
     ACPAnalytics.ClearQueue();
     ACPCore.SetPrivacyStatus(ACPMobilePrivacyStatus.OptIn);
 }
Пример #6
0
 partial void ClearQueue(UIButton sender)
 {
     ACPAnalytics.ClearQueue();
     Console.WriteLine("ClearQueue: Completed");
 }
Пример #7
0
 void ClearQueue()
 {
     Debug.Log("Calling clearQueue");
     ACPAnalytics.ClearQueue();
 }