blob: 4309d17a4070f70e21ce82094b29dd670dc76b0a (
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
|
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.messagebus.network;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
/**
* @author Simon Thoresen Hult
*/
public class IdentityTestCase {
@Test
public void requireThatAccessorsWork() {
Identity id = new Identity("foo");
assertNotNull(id.getHostname());
assertEquals("foo", id.getServicePrefix());
}
@Test
public void requireThatCopyConstructorWorks() {
Identity lhs = new Identity("foo");
Identity rhs = new Identity(lhs);
assertEquals(lhs.getHostname(), rhs.getHostname());
assertEquals(lhs.getServicePrefix(), rhs.getServicePrefix());
}
}
|