File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
core-java-modules/core-java-networking-5/src/test/java/com/baeldung/urlipaddress Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1111public class GetURLIPAddressUnitTest {
1212
1313 @ Test
14- public void givenValidURL_whenGetByInetAddress_shouldReturnAValidIPAddress () throws UnknownHostException {
14+ public void givenValidURL_whenGetByInetAddress_thenReturnAValidIPAddress () throws UnknownHostException {
1515 URLIPAddress urlipAddress = new URLIPAddress ();
1616 assertTrue (validate (urlipAddress .getByInetAddress ("www.example.com" )));
1717 }
1818
1919 @ Test
20- public void givenInvalidURL_whenGetByInetAddress_shouldThrowUnknownHostException () {
20+ public void givenInvalidURL_whenGetByInetAddress_thenThrowUnknownHostException () {
2121 URLIPAddress urlipAddress = new URLIPAddress ();
2222 assertThrows (UnknownHostException .class , () -> urlipAddress .getByInetAddress ("https://www.example.com" ));
2323 }
2424
2525 @ Test
26- public void givenValidURL_whenGetBySocketConnection_shouldReturnAValidIPAddress () throws IOException {
26+ public void givenValidURL_whenGetBySocketConnection_thenReturnAValidIPAddress () throws IOException {
2727 URLIPAddress urlipAddress = new URLIPAddress ();
2828 assertTrue (validate (urlipAddress .getBySocketConnection ("google.com" )));
2929 }
3030
3131 @ Test
32- public void givenInvalidURL_whenGetBySocketConnection_shouldThrowUnknownHostException () {
32+ public void givenInvalidURL_whenGetBySocketConnection_thenThrowUnknownHostException () {
3333 URLIPAddress urlipAddress = new URLIPAddress ();
3434 assertThrows (UnknownHostException .class , () -> urlipAddress .getBySocketConnection ("https://www.example.com" ));
3535 }
You can’t perform that action at this time.
0 commit comments