Created
April 26, 2018 10:17
-
-
Save Dssdiego/32b98b1d44e99551b22b6ac0b808a198 to your computer and use it in GitHub Desktop.
Simple functional test in java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.junit.Before; | |
import org.junit.Test; | |
import br.techhit.scanydrive.helpers.LoginHelper; | |
import static org.junit.Assert.*; | |
public class LoginHelperTest { | |
LoginHelper loginHelper; | |
@Before | |
public void setUp() { | |
loginHelper = new LoginHelper(); | |
} | |
@Test | |
public void isValidIpAddressTest() { | |
assertEquals(true, loginHelper.isValidIpAddress("127.0.0.1")); | |
assertEquals(true, loginHelper.isValidIpAddress("192.168.2.15")); | |
} | |
@Test | |
public void isNotValidIpAddressTest() { | |
assertEquals(false, loginHelper.isValidIpAddress("40")); | |
assertEquals(false, loginHelper.isValidIpAddress("www.google.com.br")); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment