File tree 1 file changed +4
-4
lines changed
core-java-modules/core-java-networking-5/src/test/java/com/baeldung/urlipaddress
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11
11
public class GetURLIPAddressUnitTest {
12
12
13
13
@ Test
14
- public void givenValidURL_whenGetByInetAddress_shouldReturnAValidIPAddress () throws UnknownHostException {
14
+ public void givenValidURL_whenGetByInetAddress_thenReturnAValidIPAddress () throws UnknownHostException {
15
15
URLIPAddress urlipAddress = new URLIPAddress ();
16
16
assertTrue (validate (urlipAddress .getByInetAddress ("www.example.com" )));
17
17
}
18
18
19
19
@ Test
20
- public void givenInvalidURL_whenGetByInetAddress_shouldThrowUnknownHostException () {
20
+ public void givenInvalidURL_whenGetByInetAddress_thenThrowUnknownHostException () {
21
21
URLIPAddress urlipAddress = new URLIPAddress ();
22
22
assertThrows (UnknownHostException .class , () -> urlipAddress .getByInetAddress ("https://www.example.com" ));
23
23
}
24
24
25
25
@ Test
26
- public void givenValidURL_whenGetBySocketConnection_shouldReturnAValidIPAddress () throws IOException {
26
+ public void givenValidURL_whenGetBySocketConnection_thenReturnAValidIPAddress () throws IOException {
27
27
URLIPAddress urlipAddress = new URLIPAddress ();
28
28
assertTrue (validate (urlipAddress .getBySocketConnection ("google.com" )));
29
29
}
30
30
31
31
@ Test
32
- public void givenInvalidURL_whenGetBySocketConnection_shouldThrowUnknownHostException () {
32
+ public void givenInvalidURL_whenGetBySocketConnection_thenThrowUnknownHostException () {
33
33
URLIPAddress urlipAddress = new URLIPAddress ();
34
34
assertThrows (UnknownHostException .class , () -> urlipAddress .getBySocketConnection ("https://www.example.com" ));
35
35
}
You can’t perform that action at this time.
0 commit comments