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


Java EqualsTester.addEqualityGroup方法代码示例

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


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

示例1: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(SystemConfigs.get(), SystemConfigs.get());

    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:SystemConfigTest.java

示例2: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(metric(), createMetric());
    tester.addEqualityGroup(metric().hashCode(), metric().hashCode());
    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:MetricTest.java

示例3: testEquality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
/**
 * Tests the {@link Mapping#equals(Object)} and {@link Mapping#hashCode()} methods.
 */
@Test
public void testEquality() {
  EqualsTester tester = new EqualsTester();
  tester.addEqualityGroup(INSTANCE, INSTANCE, new Mapping(KEY, PROPERTY));
  tester.addEqualityGroup(new Mapping(KEY, UUID.randomUUID().toString()));
  tester.addEqualityGroup(new Mapping(UUID.randomUUID().toString(), PROPERTY));
  tester.testEquals();
}
 
开发者ID:DecipherNow,项目名称:vault-maven-plugin,代码行数:12,代码来源:TestMapping.java

示例4: testEquals

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
public void testEquals() {
  EqualsTester tester = new EqualsTester();
  for (Method method : ParameterTest.class.getDeclaredMethods()) {
    for (Parameter param : Invokable.from(method).getParameters()) {
      tester.addEqualityGroup(param);
    }
  }
  tester.testEquals();
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:10,代码来源:ParameterTest.java

示例5: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(createEndpoint(), createEndpoint());
    tester.addEqualityGroup(createEndpoint().hashCode(), createEndpoint().hashCode());
    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:JMSEndpointTest.java

示例6: equality

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

    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:ActorCreationRequestTest.java

示例7: testEquality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
/**
 * Tests the {@link Path#equals(Object)} and {@link Path#hashCode()} methods.
 */
@Test
public void testEquality() {
  EqualsTester tester = new EqualsTester();
  tester.addEqualityGroup(INSTANCE, INSTANCE, new Path(NAME, MAPPINGS));
  tester.addEqualityGroup(new Path(NAME, ImmutableList.of()));
  tester.addEqualityGroup(new Path(UUID.randomUUID().toString(), MAPPINGS));
  tester.testEquals();
}
 
开发者ID:DecipherNow,项目名称:vault-maven-plugin,代码行数:12,代码来源:TestPath.java

示例8: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(ActorInputMessage.close(), ActorInputMessage.close());
    tester.addEqualityGroup(ActorInputMessage.bootstrap(), ActorInputMessage.bootstrap());
    tester.addEqualityGroup(ActorInputMessage.dumpMetrics(), ActorInputMessage.dumpMetrics());
    tester.addEqualityGroup(message(), message());

    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:11,代码来源:ActorInputMessageTest.java

示例9: testEquals

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@GwtIncompatible // too slow
public void testEquals() {
  EqualsTester equalsTester = new EqualsTester();
  for (int a : TEST_INTS) {
    long value = a & 0xffffffffL;
    equalsTester.addEqualityGroup(UnsignedInteger.fromIntBits(a), UnsignedInteger.valueOf(value),
        UnsignedInteger.valueOf(Long.toString(value)),
        UnsignedInteger.valueOf(Long.toString(value, 16), 16));
  }
  equalsTester.testEquals();
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:12,代码来源:UnsignedIntegerTest.java

示例10: testEquals

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@GwtIncompatible // too slow
public void testEquals() {
  EqualsTester equalsTester = new EqualsTester();
  for (long a : TEST_LONGS) {
    BigInteger big =
        (a >= 0) ? BigInteger.valueOf(a) : BigInteger.valueOf(a).add(BigInteger.ZERO.setBit(64));
    equalsTester.addEqualityGroup(UnsignedLong.fromLongBits(a), UnsignedLong.valueOf(big),
        UnsignedLong.valueOf(big.toString()), UnsignedLong.valueOf(big.toString(16), 16));
  }
  equalsTester.testEquals();
}
 
开发者ID:paul-hammant,项目名称:googles-monorepo-demo,代码行数:12,代码来源:UnsignedLongTest.java

示例11: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(metricValues(3), metricValues(3));

    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:MetricValuesMessageTest.java

示例12: testEquality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
/**
 * Tests the {@link Server#equals(Object)} and {@link Server#hashCode()} methods.
 */
@Test
public void testEquality() {
  EqualsTester tester = new EqualsTester();
  tester.addEqualityGroup(INSTANCE, INSTANCE, new Server(URL, TOKEN, SSL_VERIFY, SSL_CERTIFICATE, PATHS));
  tester.addEqualityGroup(new Server(UUID.randomUUID().toString(), TOKEN, SSL_VERIFY, SSL_CERTIFICATE, PATHS));
  tester.addEqualityGroup(new Server(URL, UUID.randomUUID().toString(), SSL_VERIFY, SSL_CERTIFICATE, PATHS));
  tester.addEqualityGroup(new Server(URL, TOKEN, !SSL_VERIFY, SSL_CERTIFICATE, PATHS));
  tester.addEqualityGroup(new Server(URL, TOKEN, SSL_VERIFY, new File("/dev/random"), PATHS));
  tester.addEqualityGroup(new Server(URL, TOKEN, SSL_VERIFY, SSL_CERTIFICATE, randomPaths(10, 10)));
  tester.testEquals();
}
 
开发者ID:DecipherNow,项目名称:vault-maven-plugin,代码行数:15,代码来源:TestServer.java

示例13: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(makeKey(), makeKey());
    tester.addEqualityGroup(makeKey().hashCode(), makeKey().hashCode());
    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:8,代码来源:JgroupsStateKeyTest.java

示例14: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() throws Exception {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(jgroupsEndpoint(), jgroupsEndpoint());
    tester.addEqualityGroup(jgroupsEndpoint().hashCode(), jgroupsEndpoint().hashCode());

    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:9,代码来源:JgroupsEndpointTest.java

示例15: equality

import com.google.common.testing.EqualsTester; //导入方法依赖的package包/类
@Test
public void equality() {
    EqualsTester tester = new EqualsTester();
    tester.addEqualityGroup(AGENT_KEY, AGENT_KEY);
    tester.testEquals();
}
 
开发者ID:florentw,项目名称:bench,代码行数:7,代码来源:AgentKeyTest.java


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