Ejemplo n.º 1
0
        public void Init()
        {
            _mockRequestHandler = new Mock <IRequestHandler>();
            _mockRequestHandler
            .Setup(x => x.MakeRequest(It.IsAny <Batch>()))
            .Returns(async(Batch b) =>
            {
                b.batch.ForEach(_ => RudderAnalytics.Client.Statistics.IncrementSucceeded());
            });

            RudderAnalytics.Dispose();
            Logger.Handlers += LoggingHandler;
        }
Ejemplo n.º 2
0
        public void Init()
        {
            _mockRequestHandler = new Mock <IRequestHandler>();
            _mockRequestHandler
            .Setup(x => x.MakeRequest(It.IsAny <Batch>()))
            .Returns(async(Batch b) =>
            {
                b.batch.ForEach(_ => RudderAnalytics.Client.Statistics.IncrementSucceeded());
            });

            RudderAnalytics.Dispose();
            var client = new RudderClient(Constants.WRITE_KEY, new RudderConfig().SetAsync(false), _mockRequestHandler.Object);

            RudderAnalytics.Initialize(client);
        }
Ejemplo n.º 3
0
 public void CleanUp()
 {
     RudderAnalytics.Dispose();
     Logger.Handlers -= LoggingHandler;
 }
Ejemplo n.º 4
0
 public void Init()
 {
     RudderAnalytics.Dispose();
     Logger.Handlers += LoggingHandler;
 }