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


Java NullPointerTester.setDefault方法代码示例

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


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

示例1: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    Actors.ActorHandle actorHandle = actors.create(actorConfig);
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(ActorSender.class, actorSender);
    tester.setDefault(ResourceManager.class, resourceManager);

    tester.testAllPublicConstructors(Actors.class);
    tester.testAllPublicInstanceMethods(actors);
    tester.testAllPublicInstanceMethods(actorHandle);
}
 
开发者ID:florentw,项目名称:bench,代码行数:12,代码来源:ActorsTest.java

示例2: testNullContracts

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void testNullContracts() throws Exception {
    // given
    NullPointerTester nullPointerTester = new NullPointerTester();
    nullPointerTester.setDefault(SetWithUpperBound.class, new SetWithUpperBound<Integer>(5));
    nullPointerTester.setDefault(VisibilityTimeoutExtender.class, Mockito.mock(
            VisibilityTimeoutExtender.class));

    // when
    nullPointerTester.testInstanceMethods(uut, NullPointerTester.Visibility.PACKAGE);
    nullPointerTester.testAllPublicConstructors(uut.getClass());
}
 
开发者ID:Mercateo,项目名称:sqs-utils,代码行数:13,代码来源:MessageHandlingRunnableFactoryTest.java

示例3: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(ActorKey.class, new ActorKey("dummy"));
    tester.setDefault(ActorInputMessage.class, ActorInputMessage.dumpMetrics());
    tester.setDefault(JgroupsEndpoint.class, endpoint);

    tester.testAllPublicConstructors(JgroupsSender.class);
    tester.testAllPublicInstanceMethods(sender);
}
 
开发者ID:florentw,项目名称:bench,代码行数:11,代码来源:JgroupsSenderTest.java

示例4: null_parameters_are_invalid

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

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

示例5: testNullPointers

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@GwtIncompatible // NullPointerTester
public void testNullPointers() {
  NullPointerTester tester = new NullPointerTester();
  tester.setDefault(BigInteger.class, ONE);
  tester.setDefault(int.class, 1);
  tester.setDefault(long.class, 1L);
  tester.testAllPublicStaticMethods(BigIntegerMath.class);
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:9,代码来源:BigIntegerMathTest.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, DUMMY_AGENT);

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

示例7: null_parameters_are_invalid

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

    tester.testAllPublicConstructors(Agent.class);
    tester.testAllPublicInstanceMethods(agent);
}
 
开发者ID:florentw,项目名称:bench,代码行数:10,代码来源:AgentTest.java

示例8: null_parameters_are_invalid

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

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

示例9: null_parameters_are_invalid

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_are_invalid() {
    JgroupsActorMessage actorMessage = actorMessage();
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(ActorInputMessage.class, ActorInputMessage.dumpMetrics());
    tester.setDefault(ActorKey.class, DUMMY_ACTOR);

    tester.testAllPublicConstructors(JgroupsActorMessage.class);
    tester.testAllPublicInstanceMethods(actorMessage);
}
 
开发者ID:florentw,项目名称:bench,代码行数:11,代码来源:JgroupsActorMessageTest.java

示例10: testNullContracts

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void testNullContracts() throws Exception {
    // given
    NullPointerTester nullPointerTester = new NullPointerTester();
    nullPointerTester.ignore(uut.getClass().getDeclaredMethod("canEqual", Object.class));
    nullPointerTester.ignore(uut.getClass().getDeclaredMethod("equals", Object.class));
    nullPointerTester.setDefault(QueueName.class, new QueueName("asiudb"));

    // when
    nullPointerTester.testInstanceMethods(uut, NullPointerTester.Visibility.PACKAGE);
    nullPointerTester.testAllPublicConstructors(uut.getClass());
}
 
开发者ID:Mercateo,项目名称:sqs-utils,代码行数:13,代码来源:QueueTest.java

示例11: null_parameters_invalid

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

    tester.testAllPublicConstructors(JMSAgentClusterClient.class);
    tester.testAllPublicInstanceMethods(client);
}
 
开发者ID:florentw,项目名称:bench,代码行数:11,代码来源:JMSAgentClusterClientTest.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.setDefault(ActorInputMessage.class, ActorInputMessage.dumpMetrics());
    tester.setDefault(ActorKey.class, DUMMY_ACTOR);
    tester.setDefault(JgroupsSender.class, jgroupsSender);

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

示例13: 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

示例14: null_parameters_are_invalid

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

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

示例15: null_parameters_for_constructor

import com.google.common.testing.NullPointerTester; //导入方法依赖的package包/类
@Test
public void null_parameters_for_constructor() {
    NullPointerTester tester = new NullPointerTester();
    tester.setDefault(DeployConfig.class, DUMMY_CONFIG.getDeployConfig());
    tester.setDefault(ActorKey.class, DUMMY_ACTOR);

    tester.testAllPublicConstructors(ActorConfig.class);
    tester.testAllPublicConstructors(DeployConfig.class);
}
 
开发者ID:florentw,项目名称:bench,代码行数:10,代码来源:ActorConfigTest.java


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