Commit 06092d89 by amir

add tests

parent 96b469b9
import common.configuration.ConfigProperties;
import org.junit.Test;
/**
* Created by amir on 08/08/16.
*/
public class TestConfiguration {
@Test
public void testProperties()
{
System.setProperty("configFile.location","/opt/mcx/config/config.properties");
ConfigProperties.getInstance().reloadProperties();
}
}
import org.junit.Test;
import java.net.InetAddress;
/**
* Created by amir on 21/07/16.
*/
public class TestNetwork {
@Test
public void testResolver()
{
try {
InetAddress address = InetAddress.getByName("gitlab");
boolean isReachable = address.isReachable(2000);
if(isReachable)
System.out.println("The address is reachable");
else
System.out.println("The address is not reachable");
} catch(Exception exc) {
exc.printStackTrace();
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment