本文整理汇总了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);
}
示例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);
}
示例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"));
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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"));
}
示例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());
}
示例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));
}