当前位置: 首页>>代码示例>>Java>>正文


Java NullPointerTester.testAllPublicInstanceMethods方法代码示例

本文整理汇总了Java中com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods方法的典型用法代码示例。如果您正苦于以下问题:Java NullPointerTester.testAllPublicInstanceMethods方法的具体用法?Java NullPointerTester.testAllPublicInstanceMethods怎么用?Java NullPointerTester.testAllPublicInstanceMethods使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.common.testing.NullPointerTester的用法示例。


在下文中一共展示了NullPointerTester.testAllPublicInstanceMethods方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicConstructors(IrrecoverableException.class);
    tester.testAllPublicInstanceMethods(exception);
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:IrrecoverableExceptionTest.java

示例2: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(ProcessWatcherActorInput.class, stopSampling(PID));
    tester.testAllPublicConstructors(ProcessWatcherActor.class);
    tester.testAllPublicInstanceMethods(watcherActor);
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:ProcessWatcherActorTest.java

示例3: testNullPointers

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testNullPointers() {
  NullPointerTester npTester = new NullPointerTester();
  npTester.testAllPublicConstructors(Optional.class);
  npTester.testAllPublicStaticMethods(Optional.class);
  npTester.testAllPublicInstanceMethods(Optional.absent());
  npTester.testAllPublicInstanceMethods(Optional.of("training"));
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:9,代码来源:OptionalTest.java

示例4: testChecksForNull

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
public void testChecksForNull() throws Exception {
  NullPointerTester tester = new NullPointerTester();

  tester.testAllPublicInstanceMethods(new HashingInputStream(Hashing.md5(), buffer));
  tester.testAllPublicStaticMethods(HashingInputStream.class);
  tester.testAllPublicConstructors(HashingInputStream.class);
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:8,代码来源:HashingInputStreamTest.java

示例5: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicConstructors(JgroupsMetricsRepositoryClusterClient.class);
    tester.testAllPublicInstanceMethods(clusterClient);
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:JgroupsMetricsRepositoryClusterClientTest.java

示例6: null_parameters_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_invalid() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(AgentKey.class, new AgentKey("agent"));

    tester.testAllPublicConstructors(EmbeddedActorManager.class);
    tester.testAllPublicInstanceMethods(actorManager);
}
 
开发者ID:florentw,项目名称:bench,代码行数:9,代码来源:EmbeddedActorManagerTest.java

示例7: testNullArguments

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testNullArguments() {
  NullPointerTester tester = new NullPointerTester();
  tester.testAllPublicStaticMethods(CaseFormat.class);
  for (CaseFormat format : CaseFormat.values()) {
    tester.testAllPublicInstanceMethods(format);
  }
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:9,代码来源:CaseFormatTest.java

示例8: testContains_nulls

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testContains_nulls() throws Exception {
  NullPointerTester tester = new NullPointerTester();
  Predicate<CharSequence> isWooPattern =
      Predicates.contains(Pattern.compile("Woo"));

  tester.testAllPublicInstanceMethods(isWooPattern);
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:9,代码来源:PredicatesTest.java

示例9: testNullPointerExceptions

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testNullPointerExceptions() {
  NullPointerTester tester = new NullPointerTester();
  tester.testAllPublicStaticMethods(EvictingQueue.class);
  tester.testAllPublicConstructors(EvictingQueue.class);
  EvictingQueue<String> queue = EvictingQueue.create(5);
  // The queue must be non-empty so it throws a NPE correctly
  queue.add("one");
  tester.testAllPublicInstanceMethods(queue);
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:11,代码来源:EvictingQueueTest.java

示例10: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicConstructors(AgentInputMessage.class);
    tester.testAllPublicInstanceMethods(inputMessage);
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:AgentInputMessageTest.java

示例11: null_parameters_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_invalid() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(AgentKey.class, AgentUtil.DUMMY_AGENT);

    tester.testAllPublicConstructors(AgentRegistryListenerLogger.class);
    tester.testAllPublicInstanceMethods(loggerListener);
}
 
开发者ID:florentw,项目名称:bench,代码行数:9,代码来源:AgentRegistryListenerLoggerTest.java

示例12: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    NullPointerTester tester = new NullPointerTester();

    tester.testAllPublicConstructors(JMSMetricsRepositoryClusterClient.class);
    tester.testAllPublicInstanceMethods(clusterClient);
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:JMSMetricsRepositoryClusterClientTest.java

示例13: testNulls

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testNulls() {
  final NullPointerTester tester = new NullPointerTester();

  tester.testAllPublicStaticMethods(InternetDomainName.class);
  tester.testAllPublicInstanceMethods(InternetDomainName.from("google.com"));
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:8,代码来源:InternetDomainNameTest.java

示例14: testStringConverter_nullPointerTester

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testStringConverter_nullPointerTester() throws Exception {
  NullPointerTester tester = new NullPointerTester();
  tester.testAllPublicInstanceMethods(Ints.stringConverter());
}
 
开发者ID:zugzug90,项目名称:guava-mock,代码行数:6,代码来源:IntsTest.java

示例15: testNullParameters

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
public void testNullParameters() throws Exception {
  NullPointerTester tester = new NullPointerTester();
  CacheLoader<Object, Object> loader = identityLoader();
  tester.testAllPublicInstanceMethods(makeCache(createCacheBuilder(), loader));
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:6,代码来源:LocalLoadingCacheTest.java


注:本文中的com.google.common.testing.NullPointerTester.testAllPublicInstanceMethods方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。