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