Last change
on this file since 12244 was 12244, checked in by Don-vip, 7 years ago |
see #11924 - simplify DNSName copy by using reflection
|
-
Property svn:eol-style
set to
native
|
File size:
864 bytes
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.io.remotecontrol;
|
---|
3 |
|
---|
4 | import static org.junit.Assert.assertEquals;
|
---|
5 |
|
---|
6 | import java.io.IOException;
|
---|
7 |
|
---|
8 | import org.junit.Test;
|
---|
9 |
|
---|
10 | /**
|
---|
11 | * Unit tests of {@link DNSName} class.
|
---|
12 | */
|
---|
13 | public class DNSNameTest {
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Unit test of {@link DNSName#DNSName} - null check.
|
---|
17 | * @throws IOException always (expected with null name)
|
---|
18 | */
|
---|
19 | @Test(expected = IOException.class)
|
---|
20 | public void testDNSNameNull() throws IOException {
|
---|
21 | new DNSName(null);
|
---|
22 | }
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * Unit test of {@link DNSName#DNSName} - nominal cases.
|
---|
26 | * @throws IOException never
|
---|
27 | */
|
---|
28 | @Test
|
---|
29 | public void testDNSNameNominal() throws IOException {
|
---|
30 | assertEquals("localhost", new DNSName("localhost").getName());
|
---|
31 | assertEquals("127.0.0.1", new DNSName("127.0.0.1").getName());
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.