@Test public void shouldDispatchADispatchImmediatelyEvent() throws Exception { BVPixel bvPixel = new BVPixel(dispatcher, stubData.getClientId()); BVPersonalizationEvent event = stubData.getPersonalizationEvent(); BVPageViewEvent event2 = stubData.getPageViewEvent(); bvPixel.track(event); bvPixel.track(event2); verify(dispatcher, Mockito.times(2)).dispatchBatchImmediately(); }
public <EventType extends BVAnalyticsEvent> void track(@NonNull EventType event) { trackEventForClient(event, defaultClientId); }
BVPixel { public <EventType extends BVAnalyticsEvent> void track(@NonNull EventType event) { trackEventForClient(event, defaultClientId); } }
BVPixel { public <EventType extends BVAnalyticsEvent> void track(@NonNull EventType event) { trackEventForClient(event, defaultClientId); } BVPixel(BVPixelDispatcher bvPixelDispatcher, String defaultClientId); }
BVPixel { public <EventType extends BVAnalyticsEvent> void track(@NonNull EventType event) { trackEventForClient(event, defaultClientId); } BVPixel(BVPixelDispatcher bvPixelDispatcher, String defaultClientId); static Builder builder(@NonNull Context context, @NonNull String clientId, boolean isStaging, boolean dryRunAnalytics, Locale defaultLocale); static BVPixel getInstance(); void track(@NonNull EventType event); void trackEventForClient(@NonNull EventType event, @NonNull String clientId); }
BVPixel { public <EventType extends BVAnalyticsEvent> void track(@NonNull EventType event) { trackEventForClient(event, defaultClientId); } BVPixel(BVPixelDispatcher bvPixelDispatcher, String defaultClientId); static Builder builder(@NonNull Context context, @NonNull String clientId, boolean isStaging, boolean dryRunAnalytics, Locale defaultLocale); static BVPixel getInstance(); void track(@NonNull EventType event); void trackEventForClient(@NonNull EventType event, @NonNull String clientId);  }