blob: bfb800ddde52d8cd4cca13d8197963efc47a9a15 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.config.provision;
import com.google.common.testing.EqualsTester;
import org.junit.Test;
/**
* @author lulf
*/
public class ClusterSpecTest {
@Test
public void testIdEquals() {
new EqualsTester()
.addEqualityGroup(ClusterSpec.Id.from("id1"), ClusterSpec.Id.from("id1"))
.addEqualityGroup(ClusterSpec.Id.from("id2"))
.addEqualityGroup(ClusterSpec.Id.from("id3"))
.testEquals();
}
@Test
public void testGroupEquals() {
new EqualsTester()
.addEqualityGroup(ClusterSpec.Group.from(1), ClusterSpec.Group.from(1))
.addEqualityGroup(ClusterSpec.Group.from(2))
.addEqualityGroup(ClusterSpec.Group.from(3))
.testEquals();
}
}
|