use of com.intellij.internal.statistic.connect.StatisticsConnectionService in project intellij-community by JetBrains.
the class RemotelyConfigurableStatServiceTest method testEmptyDataSending.
@Test
public void testEmptyDataSending() {
RemotelyConfigurableStatisticsService service = new RemotelyConfigurableStatisticsService(new StatisticsConnectionService(), new StatisticsHttpClientSender(), new StatisticsUploadAssistant() {
@Override
public String getData(@NotNull Set<String> disabledGroups) {
return "";
}
});
StatisticsResult result = service.send();
assertEquals(StatisticsResult.ResultCode.NOTHING_TO_SEND, result.getCode());
}
use of com.intellij.internal.statistic.connect.StatisticsConnectionService in project intellij-community by JetBrains.
the class StatisticsUploadAssistant method getStatisticsService.
public static StatisticsService getStatisticsService() {
String key = ((ApplicationInfoImpl) ApplicationInfoImpl.getShadowInstance()).getStatisticsServiceKey();
StatisticsService service = key == null ? null : COLLECTOR.findSingle(key);
if (service != null) {
return service;
}
return new RemotelyConfigurableStatisticsService(new StatisticsConnectionService(), new StatisticsHttpClientSender(), new StatisticsUploadAssistant());
}
Aggregations