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; }
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); }
public void CleanUp() { RudderAnalytics.Dispose(); Logger.Handlers -= LoggingHandler; }
public void Init() { RudderAnalytics.Dispose(); Logger.Handlers += LoggingHandler; }