Last change
on this file since 12253 was 12253, checked in by Don-vip, 7 years ago |
findbugs - NM_SAME_SIMPLE_NAME_AS_SUPERCLASS
|
-
Property svn:eol-style
set to
native
|
File size:
891 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 DNSNameFix} class.
|
---|
12 | */
|
---|
13 | public class DNSNameFixTest {
|
---|
14 |
|
---|
15 | /**
|
---|
16 | * Unit test of {@link DNSNameFix#DNSNameFix} - null check.
|
---|
17 | * @throws IOException always (expected with null name)
|
---|
18 | */
|
---|
19 | @Test(expected = IOException.class)
|
---|
20 | public void testDNSNameNull() throws IOException {
|
---|
21 | new DNSNameFix(null);
|
---|
22 | }
|
---|
23 |
|
---|
24 | /**
|
---|
25 | * Unit test of {@link DNSNameFix#DNSNameFix} - nominal cases.
|
---|
26 | * @throws IOException never
|
---|
27 | */
|
---|
28 | @Test
|
---|
29 | public void testDNSNameNominal() throws IOException {
|
---|
30 | assertEquals("localhost", new DNSNameFix("localhost").getName());
|
---|
31 | assertEquals("127.0.0.1", new DNSNameFix("127.0.0.1").getName());
|
---|
32 | }
|
---|
33 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.