com.segment.analytics.Analytics.onIntegrationReady()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(1.4k)|赞(0)|评价(0)|浏览(155)

本文整理了Java中com.segment.analytics.Analytics.onIntegrationReady()方法的一些代码示例,展示了Analytics.onIntegrationReady()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Analytics.onIntegrationReady()方法的具体详情如下:
包路径:com.segment.analytics.Analytics
类名称:Analytics
方法名:onIntegrationReady

Analytics.onIntegrationReady介绍

暂无

代码示例

代码示例来源:origin: segmentio/analytics-android

/** @deprecated Use {@link #onIntegrationReady(String, Callback)} instead. */
public void onIntegrationReady(
  @SuppressWarnings("deprecation") BundledIntegration integration, Callback callback) {
 if (integration == null) {
  throw new IllegalArgumentException("integration cannot be null");
 }
 onIntegrationReady(integration.key, callback);
}

代码示例来源:origin: segmentio/analytics-android

@Test
public void onIntegrationReadyShouldFailForNullKey() {
 try {
  analytics.onIntegrationReady((String) null, mock(Analytics.Callback.class));
  fail("registering for null integration should fail");
 } catch (IllegalArgumentException e) {
  assertThat(e).hasMessage("key cannot be null or empty.");
 }
}

代码示例来源:origin: segmentio/analytics-android

@Test
public void onIntegrationReady() {
 Analytics.Callback<Void> callback = mock(Analytics.Callback.class);
 analytics.onIntegrationReady("test", callback);
 verify(callback).onReady(null);
}

代码示例来源:origin: segmentio/analytics-android

analytics.onIntegrationReady(
  "Segment.io",
  new Analytics.Callback() {

相关文章